Lookup

  • Thread starter americasmattress8888
  • Start date
A

americasmattress8888

I am currently using a lookup and when the number being entered a negative
amount the answer comes back as #N/A why? And what is the correct way to fix
it?
 
A

americasmattress8888

no, I do not the formula is
=LOOKUP(C3,{0,500,700,100,1400,1800,2000},{0.01,0.02,0.03,0.04,0.05,0.06,0.07})*C3
 
T

Toppers

From LOOKUP help:

If lookup_value is smaller than the smallest value in lookup_vector, LOOKUP
gives the #N/A error value.

So a negative value is smaller than 0 hence #N/A.

If value is negative, what should the LOOKUP result be?
 
T

Teethless mama

=IF(C3<0,"",LOOKUP(C3,{0,500,700,100,1400,1800,2000},{0.01,0.02,0.03,0.04,0.05,0.06,0.07})*C3)
 
Top