what wrong this vlookup

if_Excel

New Member
Joined
May 19, 2011
Messages
26
i have a system that returns 0, 1 or #N/A in a range of cell say B4 to B7. i want to return the value on column C corresponding to the row where the value 1 is found. for example b4=0, b5=1 b6=#n/A, C4 26, C5=366 and C6 #N/A. i want the formula to return 366. here is what i have tried IF(ISNA(VLOOKUP(1,B4:C6,3),0)) IT didnt work. when i tried vlookup(1,B4:C6,3) i got #REF! error. please help
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
i have a system that returns 0, 1 or #N/A in a range of cell say B4 to B7. i want to return the value on column C corresponding to the row where the value 1 is found. for example b4=0, b5=1 b6=#n/A, C4 26, C5=366 and C6 #N/A. i want the formula to return 366. here is what i have tried IF(ISNA(VLOOKUP(1,B4:C6,3),0)) IT didnt work. when i tried vlookup(1,B4:C6,3) i got #REF! error. please help
Here's one way...

=SUMIF(B4:B6,1,C4:C6)
 
Upvote 0
i have a system that returns 0, 1 or #N/A in a range of cell say B4 to B7. i want to return the value on column C corresponding to the row where the value 1 is found. for example b4=0, b5=1 b6=#n/A, C4 26, C5=366 and C6 #N/A. i want the formula to return 366. here is what i have tried IF(ISNA(VLOOKUP(1,B4:C6,3),0)) IT didnt work. when i tried vlookup(1,B4:C6,3) i got #REF! error. please help
To specifically use VLOOKUP...

=VLOOKUP(1,B4:C6,2,0)
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,758
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top