+ Reply to Thread
Results 1 to 2 of 2

Array Formula NOT Returning All Desired Results

  1. #1
    Registered User
    Join Date
    12-18-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    1

    Array Formula NOT Returning All Desired Results

    Hi,

    The goal of this formula is to:
    • 1st: Take a look at the value of "US 1" - find any values in that column that are +/- 2 to it
    • 2nd: For those that fulfill the 1st criteria, then look at the value of "US 12" and find any values that are +/- 2 to it
    • Overall - to be a "match", the values of US 1 have to be +/- 2 AND the values of US 12 have to be +/- 2

    The following array formula is currently in D2:

    {=IF($A2= "","",IF(($A$2:$A$500<>""),IFERROR(INDEX($A$2:$A$500,SMALL(IF(($B$2:$B$500>=$B2-2)*($B$2:$B$500<=$B2+2)*($C$2:$C$500>=$C2-2)*($C$2:$C$500<$C2+2)*(ROW($A$2:$A$500)<>ROW($A2))=0,($B$2:$B$500>=$B2-2)*($B$2:$B$500<=$B2+2)*($C$2:$C$500>=$C2-2)*($C$2:$C$500<=$C2+2)*(ROW($A$2:$A$500)<>ROW($A2))+100000,($B$2:$B$500>=$B2-2)*($B$2:$B$500<=$B2+2)*($C$2:$C$500>=$C2-2)*($C$2:$C$500<=$C2+2)*(ROW($A$2:$A$500)<>ROW($A2))*ROW($A$2:$A$500))-1,COLUMNS($D2:D2)),1),""),""))}

    I've attached a worksheet with my current results.

    Book1.xlsx

    The following issues are arising:

    1) K should match with L, M, and N -- the formula missed M
    2) L should match with K -- the formula missed K
    3) O should match with P, Q, R, S, and T -- the formula missed S
    4) R should match with P, Q, and T -- the formula missed P and Q

    Any idea how to fix/why this is occurring? Thank you again for your help - it is MUCH appreciated!!

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Array Formula NOT Returning All Desired Results

    Try this in D2 Drag down and To right

    =IFERROR(INDEX($A$2:$A$11,SMALL(IF(($B$2:$B$11=$B2+2)+($B$2:$B$11=$B2-2)+($C$2:$C$11=$C2+2)+($C$2:$C$11=$C2-2),ROW($A$2:$A$11)-ROW($A$2)+1),COLUMN(A1))),"") array entered (Ctrl+Shift+Enter) Key.


    If this helps click "*" in the bottom left corner of my post!
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

+ 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. [SOLVED] Formula not returning desired number of digits after decimal, add text
    By Russ Fuquay in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-25-2013, 01:39 PM
  2. Index/Match formula not pulling through desired results
    By Climaxgp in forum Excel General
    Replies: 0
    Last Post: 08-02-2010, 08:14 AM
  3. Large formula not returning desired results
    By Climaxgp in forum Excel General
    Replies: 2
    Last Post: 04-21-2010, 06:05 AM
  4. Formula question-will get the desired results?
    By Tommy in forum Excel General
    Replies: 2
    Last Post: 12-12-2005, 06:25 PM
  5. Array formula returning wrong results
    By TUNGANA KURMA RAJU in forum Excel General
    Replies: 1
    Last Post: 11-19-2005, 06:35 AM

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