carlosjcabral
New Member
- Joined
- Dec 30, 2005
- Messages
- 28
The code below deletes a row if. How do you make this delete the column istead of the row if...?
Dim dd As Long, d As Long
dd = Cells(Rows.Count, 2).End(xlUp).Row
For d = 2 To dd
If Cells(d, 8).Value = "" Then Columns(d).Delete = xlToLeft
Next d
Dim dd As Long, d As Long
dd = Cells(Rows.Count, 2).End(xlUp).Row
For d = 2 To dd
If Cells(d, 8).Value = "" Then Columns(d).Delete = xlToLeft
Next d