+ Reply to Thread
Results 1 to 6 of 6

Reduce sheet to rows with certain value

Hybrid View

  1. #1
    Registered User
    Join Date
    11-30-2009
    Location
    Austin, Tx
    MS-Off Ver
    Excel 2003
    Posts
    3

    Reduce sheet to rows with certain value

    I have a spreadsheet with 34K rows. I would like to reduce to only the rows that include a certain word. What is the best way to accomplish?
    thanks, Jay
    Last edited by JayM; 11-30-2009 at 06:30 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Reduce sheet to rows with certain value

    Let's assume you're looking for "car" (including cars, etc) in column A, beginning in A2.
    In a blank column row 2, use the formula
    =IF(ISNUMBER(SEARCH("car",A2)),1,"")
    Then do an autofilter on that column for Blanks and delete the blank rows. Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    11-30-2009
    Location
    Austin, Tx
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Reduce sheet to rows with certain value

    Im afraid I dont follow. Attached is a sample spreadsheet. I would like to reduce to only the rows that include the word emergency...

    Thanks Jay
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Reduce sheet to rows with certain value

    A formula inserted into an empty column designed to check each of the cells in the row for the "word"...and provide a count if it is found anywhere in the row, something like this in row 2 (you need "titles" in row 1):

    =COUNTIF(A2:H2, "*word*")

    Now copy that formula down the 34k rows and let it calculate.

    Then click on ROW1 and turn on the AutoFilter. Data > Filter > AutoFilter

    Then filter that new column, use custom > less than 1...or just choose zero from the drop list. Either way, filter by the zeros and delete all the rows left visible all at once. Then turn off the AutoFilter and you're done.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Reduce sheet to rows with certain value

    If the match only has to occur in one column, then use ChemistB's approach.

    1) Insert a blank row at the top

    2) Put this formula in G2:
    =IF(ISNUMBER(SEARCH("car", D2)), 1, "")

    3) Copy that cell down the whole dataset

    4) Use the autofilter as described

  6. #6
    Registered User
    Join Date
    11-30-2009
    Location
    Austin, Tx
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Reduce sheet to rows with certain value

    Sweeeeeeeet!!!

    THANK YOU
    Last edited by JayM; 11-30-2009 at 06:36 PM.

+ Reply to Thread

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