deleting columns

agjohnson

New Member
Joined
Feb 25, 2002
Messages
4
I would like to insert code into a macro that goes to specified column (say column D) and deletes the columns to the right if there is data in the column until it comes to a blank column.

Thanks for any assitance.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
A little more detail would be useful. Do you want to check on a certain row or rows, or if there is *anything* (formula or value) in a column beginning with column E, from row 1 to row 65536, then you'd want that column deleted?


T. U.
 
Upvote 0
If there is anything in the rows on column
D...to whatever column i would like to delete these columns. The problem that I am having is that I have a total column to the far right which I do not want to delete.

Thanks
This message was edited by agjohnson on 2002-02-27 13:08
 
Upvote 0
Maybe I'm missing something, but according to what you are saying, your "Totals" column to the far right will have values in it too, so when should the deleting of columns with values after column D stop? What column carries your Totals, so we don't delete that, and will it always be that column (whatver it is)...if not, should the code search for a key word such as "Total" on row 1 of some column and delete up to that point?

Sounds do-able, just not sure what your situation is. I'll be stepping out for a few hours but can answer your question tonite if it is still unanswered then.

Thanks.

Tom Urtis
 
Upvote 0

Forum statistics

Threads
1,223,327
Messages
6,171,484
Members
452,407
Latest member
Broken Calculator

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top