Results 1 to 4 of 4

If column contains certain header, delete column--exempt certain columns

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-15-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    141

    If column contains certain header, delete column--exempt certain columns

    Hi,

    I frequently have to format reports in which numerous columns with the same headers need to be removed. For instance, my worksheet contains dozens of columns with the headers like "Detail X", "Detail Y", etc. and I want to quickly delete all of those columns.

    And there's a catch here: In some case I'd like to be able to keep a certain "Detail X" or "Detail Y" column. i.e. Delete all Detail X columns except for column 5.

    I'm wondering if some type of userform would be ideal here? For instance: Enter the header label for columns you'd like to find and delete, and then enter any exemptions. Enter the next header label for columns you'd like to find and delete ,and then enter any exemptions. And so on and so forth.

    This might be a time-consuming thing to build, so I'm not asking anyone to do that. I'm just looking for any suggestions or ideas about how to accomplish this.

    Some specific questions:
    Would a userform be the most convenient way to do this?
    In terms of selecting the columns, I'm thinking I would Find the header, select the column, delete, then loop; is that the most efficient way, or could I actually select all of the columns all at once?
    Last edited by kestefon; 04-18-2013 at 12:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1