Sub DELCOL()
Dim rng As Range
Dim lastrow As Long
Dim colnme As String
Dim cl
Set rng = Range("A1:G1")
For Each cl In rng
colnme = Left(cl.Address(0, 0), (cl.Column < 27) + 2)
lastrow = Cells(Rows.Count, colnme).End(xlUp).Row
If lastrow = 1 Then
cl.EntireColumn.Delete
End If
Next cl
End Sub