ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Deleting multiple columns in excel that are not in a row (https://www.excelbanter.com/excel-discussion-misc-queries/236995-deleting-multiple-columns-excel-not-row.html)

jriemens1

Deleting multiple columns in excel that are not in a row
 
I have a set of data that ranges from column A to AV. In this data I need to
delete different columns that are not in order. For example, I need to delete
columns B-D, then columns K-M, O-Z, and AC-AJ . I'm trying to build a VB
macro that I can run so I can delete these columns on some 200 different
reports. Does anybody have any ideas of a formula that I could use?

Luke M

Deleting multiple columns in excel that are not in a row
 
Possibly. But you didn't say anything about why certain columns get deleted,
and others don't. If you're just randomly picking those columns (or its
always those particular columns) simply recording yourself deleting the
columns would be the easiest way to go.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"jriemens1" wrote:

I have a set of data that ranges from column A to AV. In this data I need to
delete different columns that are not in order. For example, I need to delete
columns B-D, then columns K-M, O-Z, and AC-AJ . I'm trying to build a VB
macro that I can run so I can delete these columns on some 200 different
reports. Does anybody have any ideas of a formula that I could use?


jriemens1

Deleting multiple columns in excel that are not in a row
 
Yes, that does work but I really was wanting to know how to write it rather
than record it. This will be used by many people and I would like it to look
cleaner than what a recording would produce. Any way of actually writing it?
And yes the columns that are being deleted will be constant throught out the
different reports. If that helps...
"Luke M" wrote:

Possibly. But you didn't say anything about why certain columns get deleted,
and others don't. If you're just randomly picking those columns (or its
always those particular columns) simply recording yourself deleting the
columns would be the easiest way to go.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"jriemens1" wrote:

I have a set of data that ranges from column A to AV. In this data I need to
delete different columns that are not in order. For example, I need to delete
columns B-D, then columns K-M, O-Z, and AC-AJ . I'm trying to build a VB
macro that I can run so I can delete these columns on some 200 different
reports. Does anybody have any ideas of a formula that I could use?



All times are GMT +1. The time now is 04:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com