+ Reply to Thread
Results 1 to 12 of 12

Array Forumla-Help #NUM!

  1. #1
    Registered User
    Join Date
    05-05-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    Exclamation Array Forumla-Help #NUM!

    Good afternoon,

    i currently have the formula below (mulitiple lookup-horizontal). if there is no data to return, i currently get the following error message; #NUM!.

    Is there anything i can add to stop this happening to leave a blank cell instead.

    =INDEX($DS$6:$DS$43548, SMALL(IF($CU6=$DP$6:$DP$43548, ROW($DP$6:$DP$43548)-MIN(ROW($DP$6:$DP$43548))+1, ""), COLUMN(B4)))

    thank you

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Array Forumla-Help #NUM!

    Hi and welcome to the forum.

    As you are in Excel 2003, try this.
    Please Login or Register  to view this content.
    Is this helps you?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Re: Array Forumla-Help #NUM!

    You can try this formula

    =IFERROR(INDEX($DS$6:$DS$43548, SMALL(IF($CU6=$DP$6:$DP$43548, ROW($DP$6:$DP$43548)-MIN(ROW($DP$6:$DP$43548))+1, ""), COLUMN(B4),""))

    Oeysbrei

  4. #4
    Registered User
    Join Date
    05-05-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Array Forumla-Help #NUM!

    Sorry, both are returning errors.

  5. #5
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    MS 365 Subscription
    Posts
    323

    Re: Array Forumla-Help #NUM!

    can you post a samplebook?

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Array Forumla-Help #NUM!

    IFERROR function is only available in Excel 2007 and later. In Excel 2003 try this version

    =IF(COLUMN(B4)>COUNTIF($DP$6:$DP$43548,$CU6),"", INDEX($DS$6:$DS$43548,SMALL(IF($CU6=$DP$6:$DP$43548,ROW($DP$6:$DP$43548)-MIN(ROW($DP$6:$DP$43548))+1),COLUMN(B4))))

    confirm with CTRL+SHIFT+ENTER
    Audere est facere

  7. #7
    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,936

    Re: Array Forumla-Help #NUM!

    from what i can see, Fotis's formula should work, but he left off the end part..

    Please Login or Register  to view this content.
    also check to see if your (country) version of supports ; (semi-colon) or if you need to change it to , (comma)
    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

  8. #8
    Registered User
    Join Date
    05-05-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Array Forumla-Help #NUM!

    I refer back to my original posting.

    Is there another formula I could use to produce the same results of the lookup. Please ignore the #num! Error for now.

    I want to avoid having to use an array, therefore not having to press ctrl+shift+enter.

    I need a lookup which will display results horizontally.

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Array Forumla-Help #NUM!

    This version should work without CTRL+SHIFT+ENTER

    =IF(COLUMN(B4)>COUNTIF($DP$6:$DP$43548,$CU6),"", INDEX($DS$6:$DS$43548,LARGE(INDEX(($CU6=$DP$6:$DP$43548)*(ROW($DP$6:$DP$43548)-MIN(ROW($DP$6:$DP$43548))+1),0),COUNTIF($DP$6:$DP$43548,$CU6)-COLUMN(B4)+1)))

  10. #10
    Registered User
    Join Date
    05-05-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Array Forumla-Help #NUM!

    thank you.

    slight issue, formula appears to be picking up second available result first, and is missing out the first possible result from the lookup data completely?

    any ideas?

    thank you in advance.

  11. #11
    Registered User
    Join Date
    05-05-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Array Forumla-Help #NUM!

    Sorted now, thanks

  12. #12
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Array Forumla-Help #NUM!

    I used the same formula that you suggested in post 1 which will pick up the second result. Better, in fact, to use COLUMNS function rather than COLUMN, that will be robust (formula will still return the correct results if you insert columns), e.g. if the first result should be in C2 use this version in C2 copied across

    =IF(COLUMNS($C2:C2)>COUNTIF($DP$6:$DP$43548,$CU6),"", INDEX($DS$6:$DS$43548,LARGE(INDEX(($CU6=$DP$6:$DP$43548)*(ROW($DP$6:$DP$43548)-MIN(ROW($DP$6:$DP$43548))+1),0),COUNTIF($DP$6:$DP$43548,$CU6)-COLUMNS($C2:C2)+1)))

+ 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