View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
AHizon AHizon is offline
external usenet poster
 
Posts: 2
Default Deleting Columns to the right - 1

Yes...That is exactly what I wanted. Thanks so much!!!

JW wrote:
This will delete all empty columns. That what you are after?
Sub delColumns()
Dim lastCol As Integer
lastCol = ActiveSheet.UsedRange.Column - 1 + _
ActiveSheet.UsedRange.Columns.Count
Application.ScreenUpdating = False
For c = lastCol To 1 Step -1
If IsEmpty(Cells(1, c)) And Cells(1, c). _
End(xlDown).Row = 65536 Then _
Cells(1, c).EntireColumn.Delete
Next c
Application.ScreenUpdating = True
End Sub
Hi,

[quoted text clipped - 9 lines]

Can anyone help me?