ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   formula not working (https://www.excelbanter.com/new-users-excel/198162-formula-not-working.html)

JayPee

formula not working
 
I'm not sure why this isn't working ... please help.

A B
0.999 1
0.799 2
0.699 3
0.599 4
0.499 5
0.399 6
0.299 7
0.199 8
0.99 9

I just need to lookup a value in ,say, C1 and compare to colA and return a
value in colB.
Using: =IF(M41=0,10,IF(M411,0,VLOOKUP(M41,$C$60:$D$68,2) ))
yields #N/A for any value not 0 or 1.
What gives?




Niek Otten

formula not working
 
You did not include a 4th argument in your VLOOKUP call. That means that the table has to be sorted ascending. Bit it isn't.
Sort your table or use FALSE as 4th argument (which is probably what you require).
Make sure the underlying values match exactly, not just the values shown thru formatting.


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"JayPee" wrote in message ...
| I'm not sure why this isn't working ... please help.
|
| A B
| 0.999 1
| 0.799 2
| 0.699 3
| 0.599 4
| 0.499 5
| 0.399 6
| 0.299 7
| 0.199 8
| 0.99 9
|
| I just need to lookup a value in ,say, C1 and compare to colA and return a
| value in colB.
| Using: =IF(M41=0,10,IF(M411,0,VLOOKUP(M41,$C$60:$D$68,2) ))
| yields #N/A for any value not 0 or 1.
| What gives?
|
|
|



JayPee

formula not working
 
Thank you ... sorting colA in ascending order worked!



"Niek Otten" wrote:

You did not include a 4th argument in your VLOOKUP call. That means that the table has to be sorted ascending. Bit it isn't.
Sort your table or use FALSE as 4th argument (which is probably what you require).
Make sure the underlying values match exactly, not just the values shown thru formatting.


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"JayPee" wrote in message ...
| I'm not sure why this isn't working ... please help.
|
| A B
| 0.999 1
| 0.799 2
| 0.699 3
| 0.599 4
| 0.499 5
| 0.399 6
| 0.299 7
| 0.199 8
| 0.99 9
|
| I just need to lookup a value in ,say, C1 and compare to colA and return a
| value in colB.
| Using: =IF(M41=0,10,IF(M411,0,VLOOKUP(M41,$C$60:$D$68,2) ))
| yields #N/A for any value not 0 or 1.
| What gives?
|
|
|





All times are GMT +1. The time now is 12:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com