I have worksheet that have data starting at A84, extending to column X. I use this VBA to select the entire range of data.
Dim Lastrow As Integer
Lastrow = Range("A:Z").Find("*", , , , xlByRows, xlPrevious).Row
Range("A84:X" & Lastrow).Select
Within that selected range, I need it to detect which rows are blank from columns A to Z and delete them. If there's data after column Z, the row should be deleted because I'm considering it blank.
For i = Lastrow to 84 step -1
then:If Application.WorkSheetFormula.CountA(Range(Cells(i,1),Cells(i,26)))=0 Then Rows(i).Delete
– Scott CranerIf Application.WorkSheetFormula.CountA(Range(Cells(i,1),Cells(i??,26)))=0 Then Rows(i).Delete
– Robby