Vlookup works when typing in the number, but not when the number is obtained from a formula
So, I'm working on an excel sheet and I encountered an issue.
I have two tables, Q2:T100 which is the lookup array, and F2:I2 where I'm doing the operation.
I want to run F2-G2, obtain the result in H2, and then get the lookup value from Q2:T100 in I2.
If I manually write the result of the difference manuallyin H2, the VLOOKUP function works perfectly. However, if I make H2 return the difference, then VLOOKUP returns #N/A error.
The formula is written like this:
In I2: =VLOOKUP(H2,Q2:T100,2,FALSE)
In H2: =F2-G2
When using the "true" argument, I get the exact match when typing it manually and the result from a row above when introducing it as a formula.
I already tried formating all the cells involved to be numbers and it didn't fix the issue.