Hi Everyone ,
I need to delete blank rows in a range. This script does that.
However there are many spreadsheets with multiple tabs and the range is dynamic in some spreadsheets. What I would like to do is to create a message box and let users answer below:Sub DeleteBlankRows() Dim r As Long For r = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1 If Cells(r, 1) = "" Then Rows(r).Delete Next r End Sub
* Is first row of the range is same in each tab? If yes then let user select the first row in the first worksheet then process would apply to all worksheets. If no then let user select the first row of the range in each worksheet.
Apart from blank rows there are some certain rows need to be deleted in that range too. I will define some other certain rows like if column C has "NW", “NE”, etc then delete entire row.
Can anyone help me on this please?
Cheers