View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Delete Range of Columns

Sub Macro()
Dim lngLastcol as Long
lngLastcol = ActiveSheet.Cells.Find(What:="*", _
SearchDirection:=xlPrevious, SearchOrder:=xlByColumns).Column
Range("F1", Cells(1, lngLastcol)).EntireColumn.Delete
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"James" wrote:

can you please show me how to delete the entire column starting in column f
until an empty column is encountered. thanks.