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) |
delete multiple columns with one line?
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) |
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) . |
All times are GMT +1. The time now is 08:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com