I need assistance finding a syntax error in a complicated formula for me.

IF(AND(NOT(ISBLANK('COMPLETE LIST'::'Previous Date')), 

     NOT(ISBLANK('COMPLETE LIST'::'Prior Date'))), 

   XLOOKUP('COMPLETE LIST'::'Previous Date', 'Dates'::B, 'Dates'::C, "") - 

   XLOOKUP('COMPLETE LIST'::'Prior Date', 'Dates'::B, 'Dates'::C, ""), 

   "")

iPhone 16 Pro, iOS 18

Posted on Feb 11, 2025 9:42 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 11, 2025 9:59 AM

Conceptually, there's nothing wrong with the formula itself, so it must be something to do with the cell references or values.


It would be far easier if we had some idea of the data you're working with since it isn't clear what data/cells you're referencing.


While Numbers' penchant for 'friendly' references by name, it makes it harder to troubleshoot remotely since it isn't clear whether, for example 'Previous Date' is the intersection of the 'Previous' column and 'Date' row, or if it's a reference to a column headed 'Previous Date'


Since you're using it in an ISBLANK() function, and ISBLANK only works on cells (not ranges), I have to assume that 'Previous Date' is a cell reference, but then you use it as an an input to the XLOOKUP, which is fine, but it isn't then clear what data you're trying to extract.


Even a screenshot of your sheet would help (data can be obfuscated if it matters)

1 reply
Question marked as Top-ranking reply

Feb 11, 2025 9:59 AM in response to moesommers

Conceptually, there's nothing wrong with the formula itself, so it must be something to do with the cell references or values.


It would be far easier if we had some idea of the data you're working with since it isn't clear what data/cells you're referencing.


While Numbers' penchant for 'friendly' references by name, it makes it harder to troubleshoot remotely since it isn't clear whether, for example 'Previous Date' is the intersection of the 'Previous' column and 'Date' row, or if it's a reference to a column headed 'Previous Date'


Since you're using it in an ISBLANK() function, and ISBLANK only works on cells (not ranges), I have to assume that 'Previous Date' is a cell reference, but then you use it as an an input to the XLOOKUP, which is fine, but it isn't then clear what data you're trying to extract.


Even a screenshot of your sheet would help (data can be obfuscated if it matters)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I need assistance finding a syntax error in a complicated formula for me.

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