+ Reply to Thread
Results 1 to 7 of 7

Filter data

Hybrid View

  1. #1
    Registered User
    Join Date
    02-09-2010
    Location
    Cardiff, Wales!
    MS-Off Ver
    Excel 2007/2010
    Posts
    10

    Filter data

    Hia,

    I have a really simple question, I just don't know how to explain it easily!

    I have a spreadsheet that contains something like this:

    transaction_id sub_id order_id
    102da542eb257e099d615f98fcf65c 1252362 1252344
    10232094ce99ad52f94e7713d3fa2f 1252358 1252358
    10242062c71c07416210bba1cd34cf 1252355 1252362
    102cb7ce3e217b52b2348391fec55a 1252344 1252355
    102ada5404f7cbf9a041bcf9c73795 1252340
    10224612c44abf14a8897093b54ea6 1252332
    1021da950b261f9f9f5cd74f7aef05 1252321
    102e4276ccb10d90e78b4253121ced 1252311
    etc etc

    As you can see, sub_id and order_id are actually the same thing, but there are less order_id's and they are not in the same order as it's just a list of sub_id's that I need to keep (I also need to keep the transaction_id that is next to the sub_id). So I need to keep collumn transaction_id and sub_id together, and I need to filter those two collumns so that I am only left with transaction_id's and sub_id's if the sub_id is also in the order_id list.

    Does that make any sense what-so-ever? (I suspect not) If so, how do I do it?!

    Thanks!

    EDIT: Quick edit - Office Excel 2007!
    Last edited by jbird123; 01-11-2012 at 11:06 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,422

    Re: Filter data

    You could put a heading in D1 and this formula in D2:

    =IF(ISNUMBER(MATCH(B2,C:C,0)),"Y","N")

    and copy down, and then you could apply a filter to column D to select Y.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-09-2010
    Location
    Cardiff, Wales!
    MS-Off Ver
    Excel 2007/2010
    Posts
    10

    Re: Filter data

    Hey,

    I have done the first bit, and I appear to have the correct number of Y and N's, but could you explain what the formula does exactly so that I can work out how to filter this collumn D properly please?

    Thanks

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Filter data

    use advanced filter either rename order id to subid and use that as criteria or create a new columnwith subid as header and list order ids below it. you can then copy visible rows to somewhere.
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    02-09-2010
    Location
    Cardiff, Wales!
    MS-Off Ver
    Excel 2007/2010
    Posts
    10

    Re: Filter data

    Cheers guys, tried both ways and compared the results to make sure I was doing it right, both methods worked perfectly!

    You don't know how much time you just saved me.. column A and B both had 14,000 values and column C had 2,600, I only needed to keep the transaction_id's for the 2,600 that matched but as they were all mixed up I would have had to go through each one manually checking them, obviously just couldn't realisticly be done that way!

    Thanks again!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,422

    Re: Filter data

    Thanks for feeding back, jbird - perhaps you can mark the thread as Solved.

    Pete

  7. #7
    Registered User
    Join Date
    02-09-2010
    Location
    Cardiff, Wales!
    MS-Off Ver
    Excel 2007/2010
    Posts
    10

    Re: Filter data

    Done Thanks again!

+ 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