J
James
Hi Everyone,
I have about 10 different tabs in same format in my workbook and
having some difficulties with my macro.
Basically, My macro runs through column("B:B") and if the cell is
empty it will remove entire row, if not then it returns column D's
value with matching row.
Sub Clean()
Dim ws As Worksheet, lngRow As Long
For Each ws In Sheets
For lngRow = ws.Cells(Rows.Count, "B").End(xlUp).Row To 1 Step -1
If ws.Range("B" & lngRow) = "" Then
ws.Rows(lngRow).Delete
Else
ws.Range("D" & lngRow) = ws.Range("D" & lngRow)
End If
Next
Next
End Sub
How do I alter this code to return column "D", "F" and "H:AF"?
Thank you so much for your help.
Regards,
James
I have about 10 different tabs in same format in my workbook and
having some difficulties with my macro.
Basically, My macro runs through column("B:B") and if the cell is
empty it will remove entire row, if not then it returns column D's
value with matching row.
Sub Clean()
Dim ws As Worksheet, lngRow As Long
For Each ws In Sheets
For lngRow = ws.Cells(Rows.Count, "B").End(xlUp).Row To 1 Step -1
If ws.Range("B" & lngRow) = "" Then
ws.Rows(lngRow).Delete
Else
ws.Range("D" & lngRow) = ws.Range("D" & lngRow)
End If
Next
Next
End Sub
How do I alter this code to return column "D", "F" and "H:AF"?
Thank you so much for your help.
Regards,
James