Remove Columns with header in row 1 but no data in remainder ofco
Change the numbers if Excel 2007.
Sub Macro1()
Dim iCol As Integer
Dim iRow As Long
For iCol = 256 To 1 Step -1
iRow = Cells(65536, iCol).End(xlUp).Row
If iRow = 1 Then Columns(iCol).Delete
Next iCol
End Sub
Hth,
Merjet
|