+ Reply to Thread
Results 1 to 9 of 9

Return Mutliple data for same Value. Formula error

  1. #1
    Registered User
    Join Date
    02-07-2016
    Location
    Malta
    MS-Off Ver
    Office 2013
    Posts
    27

    Smile Return Mutliple data for same Value. Formula error

    Hi I am a newbie.

    I am currently working on excel. I needed a formula to return multiple data for the same value and found one from the internet and did some amendments to it according to my needs!

    This is the formula I am using

    =IF(ISERROR(INDEX(A:B,SMALL(IF(A:A=$E$1,ROW(A:A)),ROW($1:$1)),2)),"",INDEX(A:B,SMALL(IF(A:A=$E$1,ROW(A:A)),ROW($1:$1)),2))

    However there seems to be something wrong with the formula as it is ignoring the reference in E1.
    but when I check 'Function Arguments' formula is somehow returning the correct value!

    I need the formula to return values according to the localities.


    Could someone please help?
    print screens attached for ease of reference

    Thanks

    Excel prnt scr.jpg
    Attached Images Attached Images
    Last edited by roma83; 02-07-2016 at 05:37 AM.

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Return Mutliple data for same Value. Formula error

    This seems to be an array formula.
    According to the pictures you uploaded, I can see that you have not entered them as array formulas.

    Here is how you use array formulas-
    Select cell you want to input the formula in.
    Press F2 > Paste the formula
    Now instead of pressing enter you need to press CTRL+SHIFT+ENTER
    Check if this works.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Registered User
    Join Date
    02-07-2016
    Location
    Malta
    MS-Off Ver
    Office 2013
    Posts
    27

    Re: Return Mutliple data for same Value. Formula error

    Great it helped, you are a genius..... how did you realize that?

    Teach me

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Return Mutliple data for same Value. Formula error

    Glad to know that helped!
    It is very much clear from your formula. In the Index formula, for the second argument (highlighted red) i.e. row number you have used arrays.
    For the Index formula we know that the second argument i.e. row number has to be a number. You in the normal formula you can enter a single cell range but if you refer to the whole array i.e. A:A the formula only sees the first cell of the array i.e. A1 in this case. So the formula has to be array formula.

    Moreover, from your pic I can see in the function bar (fx) that the formula is not entered as an array formula.
    If it would have been an array formula you get curly braces around the formula like this >> {Your Formula}
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-07-2016
    Location
    Malta
    MS-Off Ver
    Office 2013
    Posts
    27

    Re: Return Mutliple data for same Value. Formula error

    Lovely... thanks for the explanation.

    Always nice to learn.

    THANKS a LOT again. MUCH APPRECIATED

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

    Re: Return Mutliple data for same Value. Formula error

    Quote Originally Posted by roma83 View Post
    =IF(ISERROR(INDEX(A:B,SMALL(IF(A:A=$E$1,ROW(A:A)),ROW($1:$1)),2)),"",INDEX(A:B,SMALL(IF(A:A=$E$1,ROW(A:A)),ROW($1:$1)),2))
    What version of Excel does this have to work in? If it's Excel 2007 or later you can reduce the length of the formula by half.

    Also, you should avoid using entire columns for logical tests in array formulas (unless you're actually using every cell in the entire column!).

    IF(A:A=$E$1 = Bad!

    IF(A2:A1000=$E$1 = Much better!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Registered User
    Join Date
    02-07-2016
    Location
    Malta
    MS-Off Ver
    Office 2013
    Posts
    27

    Re: Return Mutliple data for same Value. Formula error

    Thanks a lot... will try to amend it

  8. #8
    Registered User
    Join Date
    02-07-2016
    Location
    Malta
    MS-Off Ver
    Office 2013
    Posts
    27

    Re: Return Mutliple data for same Value. Formula error

    Further to my query... Formula seems to be working but not to the full.

    The first line of each locality is being omitted

    =IF(ISERROR(INDEX(List!$A:$D,SMALL(IF(List!A:A=$B$2,ROW(List!A:A)),ROW($A2:$C2)),2)),"",INDEX(List!$A:$D,SMALL(IF(List!A:A=$B$2,ROW(List!A:A)),ROW($A2:$C2)),2))

    For instance if I have

    Birkirkara - Joe Gatt
    Birkirkara - Maria Riolo
    Birkirkara - Vanna Demartino
    Mosta - Melanie Buhagiar
    Mosta - Francesco Gatt

    Joe Gatt and Melanie Buhagiar are being omitted from the final list

    Thanks again,

  9. #9
    Registered User
    Join Date
    02-07-2016
    Location
    Malta
    MS-Off Ver
    Office 2013
    Posts
    27

    Re: Return Mutliple data for same Value. Formula error

    Further to my query... Formula seems to be working but not to the full.

    The first line of each locality is being omitted

    =IF(ISERROR(INDEX(List!$A:$D,SMALL(IF(List!A:A=$B$2,ROW(List!A:A)),ROW($A2:$C2)),2)),"",INDEX(List!$A:$D,SMALL(IF(List!A:A=$B$2,ROW(List!A:A)),ROW($A2:$C2)),2))

    For instance if I have

    Birkirkara - Joe Gatt
    Birkirkara - Maria Riolo
    Birkirkara - Vanna Demartino
    Mosta - Melanie Buhagiar
    Mosta - Francesco Gatt

    Joe Gatt and Melanie Buhagiar are being omitted from the final list

    Thanks again,

+ 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. Find and return mutliple lines of data based on single entry
    By Aquarock in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 07-21-2014, 08:26 AM
  2. Return Unique data using mutliple but same ID in V - Look up. Help!!!!
    By Azael in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-18-2013, 03:27 PM
  3. [SOLVED] Mutliple criteria lookup to return a value
    By JIMH1980 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-18-2012, 08:00 AM
  4. Replies: 1
    Last Post: 10-16-2012, 10:59 AM
  5. to return Mutliple results with one search item
    By Bald Ben in forum Excel General
    Replies: 2
    Last Post: 01-14-2011, 04:44 PM
  6. Return Single Value from Mutliple Criteria
    By Doogs2009 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2010, 05:10 AM
  7. [SOLVED] lookup mutliple values to return one value
    By David Pelizzari, IS Manager in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-06-2006, 09:35 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