Match formula not returning value in Numbers

I have spent hours trying to get this formula:

IF('Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6 = "", "",
   IF(ISBLANK(OFFSET($A$2, ROW(reference) − ROW($LN$2), MATCH('Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6, A$1:KE$1,0) − 1, 1, 1)),
      "",
      IFERROR(OFFSET($A$2, ROW(reference) − ROW($LN$2), MATCH('Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6, A$1:KE$1,0) − 1, 1, 1), "")
   )
)


to return a values in column LN in a large table that plots values onto a chart.


Other variations of the same formula (with different cell refs) have worked for literally hundreds of values in a multitude of tables, (pl see tiny overview images of the amount of tables that do work).


I think maybe the formula is not able to find cell U6 identical text which is a drop down with text "L1-6: P/L @Exp" (in the green blue chart controller #5 Cell U6).


I have used a working drop down cell that does return column values to the left of the offending drop down cell and pasted it into the offending drop down cell U6 space and changed "L1-5: P/L @Exp" to "L1-6: P/L @Exp" but still no value is returned in my massive chart values look up table cell LN2, (of which 11 other massive chart value tables all work).


In the large chart value tables I have deleted row 1, LN1 text "L1-6: P/L @Exp" (that was created referencing the drop dow cell U6 text) and re-written it "by hand" and it still didn't return a value in cell LN 2?


Images a, b and c show the large chart value tables references in relation to the code above.

Image b and value 655.32 is what is meant to be returned in cell LN2.


I am normally able to sort these kind of reference issues out but am baffled why this one, despite "throwing the kitchen sink at it" won't resolve?


(The issue isn't that I am pulling up a reference value -- the cumulative p/l values of trade positions 1 to 6 in the wrong drop down (trade position 7)chart controller because it doesn't matter what drop down you use in the wrong trade position of the chart controller, a value will always be returned. Eg use Drop down for trade position 1 but select the drop down in trade position 10 and select position 1's p/l value in the green and blue chart controller and it will return the correct value albeit in the wrong place).


Cheers.





[Re-Titled by Moderator]

Original Title: Match Formula not Returning Value.

MacBook Pro 16″

Posted on Dec 5, 2025 9:09 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 5, 2025 1:37 PM

It will be nearly impossible for us to figure this out for you. I suggest you do some sleuthing of your own.


There are three cases in your formula where the result will be "". I suggest you temporarily change them to "1", "2", and "3" so you can tell which one is being invoked. That might help narrow down where the issue is.


You can test out smaller pieces of your formula to see if the results are what you expect. Save the text of your formula somewhere else, like maybe in TextEdit, then copy/paste smaller pieces back to the cell. For instance, you can try this piece

MATCH('Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6, A$1:KE$1,0)

If it does not give a correct result then copy/paste something even smaller from it such as

'Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6

You can manually search A1:KE1 for what you think is a match for U6 and figure out what is different about them, why they don't match.

And so on with other pieces of the formula until you find which piece of the formula is wrong.




3 replies
Question marked as Top-ranking reply

Dec 5, 2025 1:37 PM in response to Bardonicloud

It will be nearly impossible for us to figure this out for you. I suggest you do some sleuthing of your own.


There are three cases in your formula where the result will be "". I suggest you temporarily change them to "1", "2", and "3" so you can tell which one is being invoked. That might help narrow down where the issue is.


You can test out smaller pieces of your formula to see if the results are what you expect. Save the text of your formula somewhere else, like maybe in TextEdit, then copy/paste smaller pieces back to the cell. For instance, you can try this piece

MATCH('Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6, A$1:KE$1,0)

If it does not give a correct result then copy/paste something even smaller from it such as

'Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6

You can manually search A1:KE1 for what you think is a match for U6 and figure out what is different about them, why they don't match.

And so on with other pieces of the formula until you find which piece of the formula is wrong.




Dec 5, 2025 10:31 AM in response to Bardonicloud

It's really hard to triage/troubleshoot this kind of thing through screenshots, since some of the formulas require tribal knowledge (i.e. you know what you're trying to achieve, but others may not), and the cross-table linking is hard to follow since the table names aren't included in the screenshots, so we have no way (or at least a hard time) determining what you're trying to reference.


Additionally, your formula includes references that aren't clear... for example:


> ... OFFSET($A$2, ROW(reference)...


where there's no clear indication as to what reference is.


That said, I'd probably take a slightly different approach to simplify things.


Judging by the color coding, it seems like you're doing the same thing over and over - for example, you're using MATCH() to find a value, which you're plugging into OFFSET() to find a reference. You're doing this twice, once to see if it's ISBLANK() and once to see if it's ISERROR(). You could simplify this by using LET() to do this once and then simply comparing the value (which will speed up the spreadsheet, too, since fewer calculations need to be done).


LET(matchkey,'Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6,

    lookuprange,A$1:KE$1,

    lookupvalue,MATCH(matchkey,lookuprange,0),

    targetcell,OFFSET($A$2,ROW(reference)−ROW($LN$2),lookupvalue −1, 1, 1),

    IF(

        OR(
matchkey="", ISBLANK(targetcell), ISERROR(targetcell)),

        "",

        targetcell)

    )

)


The idea here is to use LET() to assign various calculations to variables, and use those variables rather than the full calculation in the functions. This makes it easier to read and debug.


In this case, I create variables for matchkey and lookuprange, which are used in a MATCH() statement. The result of this MATCH() is assigned to a new variable called lookupvalue which, in turn, is passed into OFFSET() to find the reference you're looking for, which is stored in targetcell.


From here, I then check if the matchkey is empty, if the target cell is blank, or if the lookup generates an error. For any of these I return a blank string, otherwise I return the targetcell value.


Using this form it should be easier to triage. You can change the OR() statement to return the specific cell or error that's triggering, or add additional checks before working out what value to return. For example, simply replacing the 'IF(...)' with simply matchkey will show you what the MATCH is returning.


(note that I may have transposed some of the references when re-typing the formula, so please check that they're correct before relying on this :)

Dec 5, 2025 1:37 PM in response to Camelot

Thanks very much for taking a look.


I still get a blank cell return for LN2 in the large chart value Match "Legs 1-10 P/L (Chart 5)"table using your new formula:





LET(
    matchkey, 'Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6,
    lookuprange, A$1:KE$1,
    lookupvalue, MATCH(matchkey, lookuprange, 0),
    targetcell, OFFSET($A$2, ROW() - ROW($LN$2), lookupvalue - 1, 1, 1),
    IF(
        OR(matchkey = "", ISBLANK(targetcell), ISERROR(targetcell)),
        "",
        targetcell
    )
)






I just can not for the life of me figure out what is so wrong with this cell LN2 that it won't work like all the other hundreds and hundreds of cells that are using the same matching formula? I have even deleted the whole cell and started fresh which made no difference and stills results in a blank cell using my match formula (that works fine everywhere else)...


Using:


LET(
    matchkey, 'Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6,
    matchkey
)


Returns "L1-6: P/L @Exp" in cell LN2.


Lookup:

LET(
    matchkey, 'Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6,
    lookuprange, A$1:KE$1,
    lookupvalue, MATCH(matchkey, lookuprange, 0),
    lookupvalue
)


Result: MATCH couldn’t find the value “L1-6: P/L @Exp”.



Target cell:


LET(
    matchkey, 'Controller 5 - Cumulative Option Price / Profit & Loss with Cumulative Greeks'::$U$6,
    lookuprange, A$1:KE$1,
    lookupvalue, MATCH(matchkey, lookuprange, 0),
    targetcell, OFFSET($A$2, ROW() - ROW($LN$2), lookupvalue - 1, 1, 1),
    targetcell
)


Result: MATCH couldn’t find the value “L1-6: P/L @Exp”.



Brilliant @Camelot: It could not match because within range A$1:KE$1, I had "L1-6: P/L @Expiry" and not "L1-6: P/L @Exp"

Thanks too @Badunit.


Thank you both so much ☺️

Match formula not returning value in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.