![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 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. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
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. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2002
Posts: 4
|
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 ] |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|