+ Reply to Thread
Results 1 to 2 of 2

Deleting multiple columns

  1. #1
    Registered User
    Join Date
    11-17-2022
    Location
    Berlin, Germany
    MS-Off Ver
    MS 365
    Posts
    3

    Question Deleting multiple columns

    I have a formatted table with columns titled name, age, gender, date of birth, dietary restrictions, etc. I want to delete an entire column if the 'A' row contains a specific value (for example, delete the columns if the cell contains the strings "age" and "gender").

    Since out of 27 columns I'll be only be left with 4 in the end, I guess it would make sense to somehow "select" only these four and delete everything that's not selected.

    I tried many approaches but for some reason or another it never works as expected. I think something goes wrong when I use a for loop?
    Attached Files Attached Files
    Last edited by aliara; 11-17-2022 at 12:08 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Deleting multiple columns

    Can you give more details please
    the 'A' row contains a specific value
    Is it the Column A?
    What are the specific values?
    - Battle without fear gives no glory - Just try

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA to hide Multiple Columns based on Headers
    By FvdF in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2020, 02:46 PM
  2. [SOLVED] Extract multiple row headers and column headers if criteria is met in multiple columns
    By PaulM100 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-20-2019, 04:56 AM
  3. [SOLVED] Match and copy multiple columns based on different headers
    By Flor87 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-20-2019, 08:35 AM
  4. Copy/Paste Columns from Multiple Worksheets based on Headers into new Worksheet
    By casper3043 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2015, 03:06 PM
  5. Selecting Multiple columns based on headers and copying to seaperate sheet
    By jonto81 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2013, 10:44 AM
  6. deleting columns with headers not contained in a list
    By excelfuchs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 10:11 AM
  7. [SOLVED] Deleting Duplicates Based on Multiple Criteria from Multiple Columns
    By Franklic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2012, 05:31 PM

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