Sub Demo1()
Dim C%
Application.ScreenUpdating = False
With [A1].CurrentRegion.Columns
For C = .Count To 1 Step -1
If Application.CountA(.Item(C)) < 2 Then .Item(C).Delete
Next
End With
Application.ScreenUpdating = True
End Sub
| A | B | C | D |
| 1 | 4 |
< 2 to < 1.| Header 1 | Header 2 | Header 3 | Header 4 |
| 3 | 6 | ||
| 5 | 5 | 7 |
| Header 1 | Header 2 | Header 4 |
| 3 | 6 | |
| 5 | 5 | 7 |
I need to delete only empty column between A:D
According to the attachment a VBA demonstration for a beginner starters :Code:Sub Demo1() Dim C% Application.ScreenUpdating = False With [A1].CurrentRegion.Columns For C = .Count To 1 Step -1 If Application.CountA(.Item(C)) < 2 Then .Item(C).Delete Next End With Application.ScreenUpdating = True End SubDo you like it ? So thanks to click on bottom right Like !