I am working with a sheet 150 rows by 25 columns wide. Column A is my row # column. I need to delete all rows with a blank in column M. I have a macro to do that but it also removes the corresponding # in column A. I would like to have this first column renumber after the blanks are removed. Any suggestions. Thanks.
Help with renumbering column
- hamptongolfer11
- Thread is marked as Resolved.
-
-
-
Use the Macro Recoder to compile your new macro, elsewise, post your macro that you use to delete rows with blank M column if you need other help.
-
Thanks, new to macros. Thought I had tried that but it did work this time.
-
-
Assuming your data starts in row 1, try:
Code
Display MoreSub delRows() Application.ScreenUpdating = False Dim LastRow As Long Columns(13).SpecialCells(xlCellTypeBlanks).EntireRow.Delete LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row With Range("A1") .Value = "1" .AutoFill Destination:=Range("A1").Resize(LastRow), Type:=xlFillSeries End With Application.ScreenUpdating = True End Sub
-
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!