Excel VBA delete blank row between dynamic range

Hi expert

I would like to delete some blank rows in a table with dynamic range, some times the table will have more rows and some times it will be less.
The range to be deleted are restricted between the hightlighted yellow range (i.e. between B8 and B59(variable)) in the attahced example.

App reads from line 10 to the next yellow line. It looks at all cells from A:J and if empty, marks for deletion. Once the next yellow line is found, all rows marked for deletion are deleted.

The code would be shorter just checking for null in column A, but I thought best to check every column where you have data, thus the inner loop.

There's a button for this on your sheet.

Option ExplicitSub delblankRows()Dim wkb As WorkbookDim wks As WorksheetDim rng As RangeDim r As RangeDim chkRow As StringDim rng2 As RangeDim r2 As RangeDim rDelete As RangeDim lastRow As Long Set wkb = ThisWorkbook Set wks = wkb.ActiveSheet lastRow = wks.Cells.Find(what:="*", LookIn:=xlValues, lookat:=xlPart, searchorder:=xlByRows, searchdirection:=xlPrevious).Row Set rng = wks.Range("A10:A" & lastRow) For Each r In rng If r.Interior.Color = vbYellow Then Exit For 'exit when hit next yellow line End If Set rng2 = wks.Range("A" & r.Row & ":J" & r.Row) For Each r2 In rng2 chkRow = chkRow & Trim(r2.Value) Next r2 If chkRow = vbNullString Then If rDelete Is Nothing Then Set rDelete = r Else Set rDelete = Union(r, rDelete) End If Else chkRow = vbNullString End If Next r If Not rDelete Is Nothing Then rDelete.EntireRow.DeleteEnd Sub