Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Location
    Auckland
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    I have two columns of data;

    Category Data
    A Fred
    B Simon
    A Mark
    A John
    B Mike
    C Sarah
    C Bill
    B Jane
    A Kate
    C Anna

    I need a formula that produces this:

    Category Data
    A Fred
    A Mark
    A John
    A Kate

    that is, return each value in col B that matches "A" in col A, there will be multiple matches so needs to be a list (or array)


    -I know this is easy using an advanced filter, but this is static, I need the data to update as rows are added or changed in the original list.

    Thoughts have been around;
    - vlookup but each row needs to return the next match not the first match (so 5 matches would need 5 rows). - can't just change the search array as don't know where each match is
    -DGet - but this ony returns a single match
    -so expect something using match, index offset but am struggling.

    -Could write it with VBA but would prefer to use a standard formula

    Thanks

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    Check out the functions I created at:
    http://lounge.windowssecrets.com/ind...dpost&p=395235

    I think the VLookupAll may be what you are after.

    Steve

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Hi Simon,

    Check out the attached workbook - it has a data sheet and two 'item' sheets that use formulae for the kind of thing you're after.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    New Lounger
    Join Date
    Dec 2009
    Location
    Auckland
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks guys great responses both did what I needed.

    The VLIndex function is probably the best approach. I am in awe of the formula macropod but can see that no one would be able to maintain it after I'm gone.

    Thanks


    P.S. I have used this unique items before but wasn't quite right for this one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •