J
Johannes_R
Hi,
I have linked two sheets and would like to delete all blanks in the second
sheets.
I'm using this macro:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "B").Value = "" Then
' rows(RowNdx).Delete
Rows(RowNdx).EntireRow.Hidden = True
End If
Next RowNdx
End Sub
I want to make two adjusments to this macro:
1. This macro hides the blank columns- I want to delete them
2. I would like it to update automatically when I update the sheets
3. I would like the numbering to follow with the filled columns
Is this possible?
Appreciate all the help I can get!
I have linked two sheets and would like to delete all blanks in the second
sheets.
I'm using this macro:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "B").Value = "" Then
' rows(RowNdx).Delete
Rows(RowNdx).EntireRow.Hidden = True
End If
Next RowNdx
End Sub
I want to make two adjusments to this macro:
1. This macro hides the blank columns- I want to delete them
2. I would like it to update automatically when I update the sheets
3. I would like the numbering to follow with the filled columns
Is this possible?
Appreciate all the help I can get!