+ Reply to Thread
Results 1 to 3 of 3

Help needed with #REF! error (arrays)

  1. #1
    Registered User
    Join Date
    05-04-2006
    Posts
    56

    Help needed with #REF! error (arrays)

    Hi,
    Need fresh eyes on this one.
    For the life of me I cannot work out why I receive a #REF error with this array.
    It's producing the right number of results for the arguments, but is displaying REF which does not make sense to me because values exist in the referenced cells.

    using this formula:
    Please Login or Register  to view this content.
    Spreadsheet attached.
    Thanks in advance.
    Cam
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Your IF function within the SMALL function returns a value between 88 and 91 whereas INDEX with a four cell range needs to be fed a number between 1 and 4, hence the #REF! error.

    ....so you need to change ROW($J$88:$J$91) to ROW($J$88:$J$91)-ROW($J$88)+1. You can also make a few small changes to make the formula more robust. I'd use this in H95 copied down

    =IF(ROWS(H$95:H95)>COUNTIF($J$88:$J$91,$H$94),"",INDEX(H$88:H$91,SMALL(IF($J$88:$J$91=$H$94, ROW($J$88:$J$91)-ROW($J$88)+1,""),ROWS(H$95:H95))))

    confirmed with CTRL+SHIFT+ENTER

  3. #3
    Registered User
    Join Date
    05-04-2006
    Posts
    56
    awesome. thanks for making it more robust too - was having an issue with its 'delicacy'

    cheers!

+ 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