Forum Discussion
Tommo1105
Jul 30, 2025Copper Contributor
Vlookup problems
I am trying to use Vlookup to create some calculations for some data, but the lookup value, is not always used, so I get the #N/A error. I use a lookup which searches three separate sheets for a sp...
Jul 30, 2025
You can wrap each VLOOKUP with IFNA or IFERROR to ensure a value of 0 is returned when not found.
Here’s a corrected formula that handles missing lookup values safely:
=LET(
found1, IFNA(VLOOKUP($B8,'22GP Raw data'!$1:$1000,4,FALSE), 0),
found2, IFNA(VLOOKUP($B8,'22GP Raw data'!$1:$1000,5,FALSE), 0),
diff, found1 - found2,
IF(diff < 0, 0, diff)
)
------------------------------------
Don't forget to mark as solution if my answer suits you
Tommo1105
Jul 30, 2025Copper Contributor
Didn't work, and when used, it returned a 2 when it should have been 0. 'found and diff' I have never used, but will try to use some of this to see if I can find a solution.