+ Reply to Thread
Results 1 to 5 of 5

trying to delete columns in a worksheet that dont match header values

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    15

    trying to delete columns in a worksheet that dont match header values

    I have a table that has several rows that is pulled daily. I want to delete all rows of data that does not have the 4 header values that I want to keep in the spreadsheet after the macro is run.

    headers are in row 1

    Thanks

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: trying to delete columns in a worksheet that dont match header values

    Can you attach a sample file with some dummy data showing the beginning data and what it should look like after the macro is run (result). To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

  3. #3
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: trying to delete columns in a worksheet that dont match header values

    Sample3.xlsm

    The lines I want to keep are colored in light orange and blue. All other data can be deleted
    Last edited by Rob69mfj; 05-21-2014 at 03:40 PM. Reason: to remove incorrect sample files

  4. #4
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: trying to delete columns in a worksheet that dont match header values

    sample 3 is correct file

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: trying to delete columns in a worksheet that dont match header values

    This should work on Sample3.

    Please Login or Register  to view this content.

+ 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. Macro to Compare two columns and publish sheet name in case columns dont match
    By adaws in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 01:21 PM
  2. delete rows where the numbers dont match
    By steve111 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-04-2014, 03:17 PM
  3. How to automatically delete rows which dont match criteria
    By Endorphin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-11-2006, 10:51 AM
  4. Delete Rows that dont match criteria in VB
    By mad_lock in forum Excel General
    Replies: 0
    Last Post: 01-26-2005, 08:12 AM
  5. Delete Rows that dont match criteria in VB
    By mad_lock in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2005, 06:41 AM

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