Does IF always correctly recognise the output of XLOOKUP in Mac Numbers?
I use a Summary table to extract data from a large number of sheets, each with many data tables. Originally the Summary table cells were simply populated using XLOOKUP formulae. However some of the data tables occasionally contain cells with missing data, I.e. blank cells, and, as shown in the following trivial example, this raised a problem.
The first table below is playing the part of one of my data tables..
Table 2 uses XLOOKUP() as in my original Summary table. The missing data from first table is interpreted as a 0.
In the sundry table I need to replace such missing data values with default values. Not sure whether it is relevant or not but the missing data and default values are always Dates.
I'm now trying to catch the missing data values with an IF statement but without success as shown in the following .
replace Col B formulae like
XLOOKUP($A2,Data::A,Date,"XXX",0,1)
with
IF(XLOOKUP($A2,Data::A,Date,"XXX",0,1)=0,Info::$B$1,XLOOKUP($A2,Data::A,Date,"XXX",0,1))
In Table 3 the IF statement seems not to recognise the 0 generated by XLOOKUP as my default value is not displayed in Row 3.
I'm hoping that someone here will be able to tell me 1) what is wrong with my IF(XLOOKUP( … formula and/or 2) whether there is another strategy to achieve the desired outcome.
-JBH2
MacBook Pro 16″, macOS 12.6