+ Reply to Thread
Results 1 to 9 of 9

Return several values based on 1 criteria

  1. #1
    Registered User
    Join Date
    08-22-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Question Return several values based on 1 criteria

    Hello Excel Forum.

    I'm to trying to get this worksheet where a list of values will return based on the same customer on different sheet.
    How do I go about this?

    I did try vlookup, but gives the the same value instead of multiple values.
    Attached Files Attached Files
    Last edited by kenjcd; 05-14-2019 at 10:58 PM.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Return several values based on 1 criteria

    Because the value you are searching for "George" is not unique in your lookup table, you will only find the first match from top down.

  3. #3
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Return several values based on 1 criteria

    You can accomplish this with INDEX/MATCH array formulas. Array formulas are committed by holding ctrl+shift and hitting enter. In B4 on Receipt tab:
    Please Login or Register  to view this content.
    In C4 on Receipt tab:
    Please Login or Register  to view this content.
    And finally, if you want auto numbers in column A on the Receipt tab, use this non-array formula (entered normally):
    Please Login or Register  to view this content.
    Does that give you the results you're looking for?
    If someone helped achieve your solution, consider clicking "* Add Reputation" on their post.

    If your question has been answered, mark the thread as [SOLVED] using the Thread Tools menu at the top of the thread.

  4. #4
    Registered User
    Join Date
    08-22-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Re: Return several values based on 1 criteria

    Good day Melvosh!
    Thank you so much for your help.

    Formula only seem to work with George but not with other values
    Attached Files Attached Files
    Last edited by kenjcd; 05-14-2019 at 03:32 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Return several values based on 1 criteria

    I didn't test the "number generator" formula. Let me work on that. If you manually put in numbers starting at 1, it will work.

  6. #6
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Return several values based on 1 criteria

    You can use this in column A on Receipt:
    Please Login or Register  to view this content.
    Be aware, it relies on the formula starting in row 4. If it needs to start elsewhere, change the 3 in the formula to one less than the row it starts in.

  7. #7
    Registered User
    Join Date
    08-22-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Re: Return several values based on 1 criteria

    Quote Originally Posted by Melvosh View Post
    You can use this in column A on Receipt:
    Please Login or Register  to view this content.
    Be aware, it relies on the formula starting in row 4. If it needs to start elsewhere, change the 3 in the formula to one less than the row it starts in.
    Hi Melvosh.
    Correct me if I'm wrong. Say I want to add new customer, all I need to do is change the formula e.g $B$2:$B$20 (previously $B$2:$B$9) enter as an array and rest follow right?

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    I don't know where I'm doing it wrong but, it wont show the new value.

  8. #8
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Return several values based on 1 criteria

    Perhaps put this on B4 and copied down and cross until blanks :

    =IFERROR(INDEX(Sheet1!B$2:B$100,AGGREGATE(15,6,(ROW(Sheet1!B$2:B$100)-MIN(ROW(Sheet1!B$2:B$100))+1)/(Sheet1!$A$2:$A$100=$C$1),ROW(A1))),"")

    For Numbering use this:
    =IF(B4="","",COUNTA($B$4:B4))
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-22-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Re: Return several values based on 1 criteria

    Quote Originally Posted by azumi View Post
    Perhaps put this on B4 and copied down and cross until blanks :

    =IFERROR(INDEX(Sheet1!B$2:B$100,AGGREGATE(15,6,(ROW(Sheet1!B$2:B$100)-MIN(ROW(Sheet1!B$2:B$100))+1)/(Sheet1!$A$2:$A$100=$C$1),ROW(A1))),"")

    For Numbering use this:
    =IF(B4="","",COUNTA($B$4:B4))
    Noted.
    Thank you azumi/Melvosh/kersplash
    Last edited by kenjcd; 05-15-2019 at 01:35 AM.

+ 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. Replies: 3
    Last Post: 05-12-2018, 05:07 PM
  2. [SOLVED] Return amount values based on date and name criteria
    By MyStix01 in forum Excel General
    Replies: 2
    Last Post: 10-09-2017, 09:26 PM
  3. [SOLVED] Return Values based upon multiple criteria
    By frustrated in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2016, 08:56 AM
  4. Return column values based on criteria
    By SalientAnimal in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2014, 10:55 AM
  5. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 AM
  6. Return values from table based on 2 criteria
    By BCjohnstone in forum Excel General
    Replies: 1
    Last Post: 08-30-2006, 09:37 PM

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