+ Reply to Thread
Results 1 to 6 of 6

Related question to this previous post: Deleting all but a few columns

  1. #1
    Registered User
    Join Date
    05-17-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Related question to this previous post: Deleting all but a few columns

    I just read this following post:

    http://www.excelforum.com/excel-prog...w-columns.html

    My question is, what if you wanted to delete columns that contains a specific word in the header?

    For example, I have the following columns:

    Individual_email_address
    Ind_emailaddress
    Email_Address_Ind

    And I want to delete the entire column that contained the word "email"

    Any help is greatly appreciated!

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Related question to this previous post: Deleting all but a few columns

    This will maybe do the trick.
    Please Login or Register  to view this content.
    Kind regards, Harry.

  3. #3
    Registered User
    Join Date
    05-17-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Related question to this previous post: Deleting all but a few columns

    oh goodness, you are a lifesaver!

    One additional question:

    If I was searched for multiple keywords (ie. "email", "id", first", etc)...will it work if I seperate them by commas in the code you provided or do I need to enter new lines with or statements?

    I'm new to VBA and trying to learn. Thank you SO MUCH for your response!

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Related question to this previous post: Deleting all but a few columns

    Test it in a testfile.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-17-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Related question to this previous post: Deleting all but a few columns

    I have to say, Harry, you are my hero. That worked perfectly.

    Thank you!

  6. #6
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Related question to this previous post: Deleting all but a few columns

    Thanks for all your praise.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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