+ Reply to Thread
Results 1 to 9 of 9

Return multiple values for one data point

  1. #1
    Registered User
    Join Date
    01-10-2015
    Location
    Syracuse, NY
    MS-Off Ver
    2007
    Posts
    11

    Return multiple values for one data point

    Hello! I've had a excel situation at work that I can't seem to figure out what to do, so I was hoping this forum could help! I know how to use vlookup and it is close to what I need done, but since it only returns the 1st value it isn't quite what I need. I need a formula that will return multiple values.

    I'm comparing two large lists of accounts and their charges to make sure each list has the same data. So if account ABC123 had 3 charges ($1, $5, $10 in a column in that order) I want to be able to run formula from one list to the other that shows all of the charges for each account. If I run vlookup, it would only show the 1st charge (in this case $1) for the ABC123 account every time. I would like to be able to run a formula so it lists whatever the next charge is.

    Anyone have any ideas?

    Thanks for your time!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Return multiple values for one data point

    Hi, welcome to the forum

    2 suggestions spring to mind for this...
    a helper column combining the account number with a unique counter that increases with each instance of that account (=COUNTIF($A$1:A1,A1)
    using INDEX/SMALL array

    However, to offer more precise suggestions, I suggest you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-10-2015
    Location
    Syracuse, NY
    MS-Off Ver
    2007
    Posts
    11

    Re: Return multiple values for one data point

    Hey thanks for your response! I've tried using the index formula combined with others but get really confused with it so I haven't gotten very far. I will take a look at what I'm working on Monday and upload a sample workbook that evening so I can give you a better idea of what I'm trying to do

    Thanks again

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return multiple values for one data point

    Sounds like you want to do this:

    Lookup with multiple instances of the lookup value
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return multiple values for one data point

    Depends on your other data in your sheet.

    But it sound to me a pivot table could make your life easier on this file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    01-10-2015
    Location
    Syracuse, NY
    MS-Off Ver
    2007
    Posts
    11

    Re: Return multiple values for one data point

    Hi all,

    Attached is a sample of the data I'm working with. I have briefly looked at the suggestions from the previous posts, but I haven't had a chance to test any of it with my data.

    Thanks again for taking a look

    Book1.xlsx

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return multiple values for one data point

    This array formula** entered in C2 and copied down:

    =IFERROR(INDEX('Data 2'!B:B,SMALL(IF('Data 2'!A$2:A$10=A2,ROW('Data 2'!A$2:A$10)),COUNTIF(A$2:A2,A2))),"NA")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  8. #8
    Registered User
    Join Date
    01-10-2015
    Location
    Syracuse, NY
    MS-Off Ver
    2007
    Posts
    11

    Re: Return multiple values for one data point

    Yayyy! Thank you so much, Tony!!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Return multiple values for one data point

    You're welcome!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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: 9
    Last Post: 11-26-2012, 12:46 AM
  2. [SOLVED] Return Multiple Values based on a single reference point
    By qfalker in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-20-2012, 01:00 PM
  3. Return series point data value
    By mchristisen in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-30-2009, 08:24 AM
  4. Intersection point return data
    By tvtime in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 07-27-2006, 02:25 PM
  5. Indexing Values to Same Starting Point for Relative Return Chart
    By Notclevr in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-18-2006, 06:35 PM

Tags for this Thread

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