Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default delete multiple columns with one line?

Is there a way to replace this:

With Worksheets("Dif_data")
Columns("G:G").Delete
Columns("O:O").Delete
Columns("AB:AC").Delete
End With

With something shorther like:

Columns("G:G, P:P, AD:AE").Delete

(Doesn't work like this because I get this type mistmatch
error 13)


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default delete multiple columns with one line?

That works. Thanks for the assistance.

Bruce
-----Original Message-----
Bruce,

Try

Range("G:G, P:P, AD:AE").Delete


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com


"Bruce Roberson" wrote in

message
...
Is there a way to replace this:

With Worksheets("Dif_data")
Columns("G:G").Delete
Columns("O:O").Delete
Columns("AB:AC").Delete
End With

With something shorther like:

Columns("G:G, P:P, AD:AE").Delete

(Doesn't work like this because I get this type

mistmatch
error 13)




.

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
Delete rows with multiple columns with 0 value Tasha Excel Discussion (Misc queries) 8 July 2nd 09 08:35 PM
How do I delete rows and multiple columns automatically? Dazed and Confused[_2_] Excel Discussion (Misc queries) 5 February 3rd 09 12:27 AM
Delete Formula Based on Multiple Columns Cue Excel Discussion (Misc queries) 2 June 23rd 08 03:41 AM
VBA Delete row based on multiple columns of data jlclyde Excel Discussion (Misc queries) 3 November 26th 07 07:46 PM
Formula to delete blank cells across multiple columns? SamFunMail Excel Worksheet Functions 2 September 1st 05 07:05 AM


All times are GMT +1. The time now is 08:52 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"