deleting columns
Find bottlenecks in your Excel workbooks
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: deleting columns

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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. #2
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    New Member
    Join Date
    Feb 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #4
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com