Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sal Sal is offline
external usenet poster
 
Posts: 84
Default Delete Columns

Sub DeleteColumns ( )

Range("K:K,M:M,P:P,S:S").Select
Selection.Delete Shift:=xlToLeft

End Sub


Is there a cleaner way to delete these columns than the code above?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Delete Columns

maybe this

Range("K:K,M:M,P:P,S:S").Delete

mike


"Sal" wrote:

Sub DeleteColumns ( )

Range("K:K,M:M,P:P,S:S").Select
Selection.Delete Shift:=xlToLeft

End Sub


Is there a cleaner way to delete these columns than the code above?

  #3   Report Post  
Posted to microsoft.public.excel.programming
Sal Sal is offline
external usenet poster
 
Posts: 84
Default Delete Columns

Exactly what I was looking for. Thank you for the help.

"Mike H" wrote:

maybe this

Range("K:K,M:M,P:P,S:S").Delete

mike


"Sal" wrote:

Sub DeleteColumns ( )

Range("K:K,M:M,P:P,S:S").Select
Selection.Delete Shift:=xlToLeft

End Sub


Is there a cleaner way to delete these columns than the code above?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
create a macro to delete columns and then border remaining columns Jane777 Excel Programming 1 July 18th 07 12:08 AM
merge text from 2 columns into 1 then delete the old 2 columns sleepindogg Excel Worksheet Functions 4 March 30th 06 07:25 PM
can't delete columns Ed White Excel Programming 6 March 8th 06 03:02 PM
Delete columns Scottmk[_32_] Excel Programming 8 September 3rd 04 01:11 AM
Delete Columns Jean[_5_] Excel Programming 1 March 5th 04 02:03 PM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"