How do I write a macro to check each Row Columns A-O and if they are all empty it will Delete the row. I would need it for it to somehow calculate the last row on the sheet and work its way from the bottom to the top.
How do I write a macro to check each Row Columns A-O and if they are all empty it will Delete the row. I would need it for it to somehow calculate the last row on the sheet and work its way from the bottom to the top.
Something like:
Although this finds the last row based on column A, so if your last row has nothing in column A it won't work so well.![]()
Sub Macro_1() Dim row_count For row_count = Range("A" & Rows.Count).End(xlUp).Row To 1 Step -1 If Range("O" & row_count).End(xlToLeft).Column = 1 And Range("O" & row_count) = "" Then Rows(row_count).Delete End If Next row_count End Sub
Thank You it works! I just changed it to a different column and everything works. Appreciate the help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks