简体   繁体   中英

Vlookup using formula for lookup_value

I'm trying to use a vlookup formula where the lookup_value is a formula. If I use a value in that cell rather than a formula, the vlookup works just fine.

My Lookup-value is in cell D43 and the formula in there is ="B43/D41" My vlookup is =VLOOKUP(D43,Sheet2!A1:B2992,1,FALSE).

I get #N/A with this. When I change D43 to just a value (ie 1.21) it works.

Everything is formated as a number.

Help?

If the result of =B43/D41 is not exactly 1.21, then an #N/A result will be expected, because the exact match (1.21) has not been found in the lookup array.

So the problem is the decimal precision in your lookup array is not the same as what's returned from your division. Assuming your lookup array uses 2 decimals only then you could fix it like:

=VLOOKUP(Round(D43,2),...)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM