Hi,
I'm trying to look up a department A14 (in columns) and account A13 (in rows). Sometimes, the department won't exist. Other times the account may not exist.
This formula works if the account does not exist and returns a zero. Great!
=+XLOOKUP($A14,$A$2:$A$8,XLOOKUP($B14,$B$1:$D$1,$B$2:$D$8),0)
But, if the department does not exist, I get an "#N/A".
So, I tried adding another "if not found" in bold here:
=+XLOOKUP($A15,$A$2:$A$8,XLOOKUP($B15,$B$1:$D$1,$B$2:$D$8,0),0)
But, I got "#VALUE!" instead of a zero.
I cannot figure out how to have both the column and the row XLOOKUP in this nested formula use "if not found" criteria. The data changes every quarter, and I don't want to have to add fake data or mess with the formula each time. I need it to return 0 if either or both are not found.
Any ideas on using XLOOKUP here?
Thanks!
I'm trying to look up a department A14 (in columns) and account A13 (in rows). Sometimes, the department won't exist. Other times the account may not exist.
This formula works if the account does not exist and returns a zero. Great!
=+XLOOKUP($A14,$A$2:$A$8,XLOOKUP($B14,$B$1:$D$1,$B$2:$D$8),0)
But, if the department does not exist, I get an "#N/A".
So, I tried adding another "if not found" in bold here:
=+XLOOKUP($A15,$A$2:$A$8,XLOOKUP($B15,$B$1:$D$1,$B$2:$D$8,0),0)
But, I got "#VALUE!" instead of a zero.
I cannot figure out how to have both the column and the row XLOOKUP in this nested formula use "if not found" criteria. The data changes every quarter, and I don't want to have to add fake data or mess with the formula each time. I need it to return 0 if either or both are not found.
Any ideas on using XLOOKUP here?
Thanks!