IF Formula with Vlookup Built in

BlueRhinos

Board Regular
Joined
Aug 31, 2007
Messages
83
Objective: I'd like to return specific value based on a lookup condition. Specifically return x IF the person's ID # is in a range of values. My thought is that we can accomplish by using a vlookup within an IF. Can anybody help with the syntax?

Thanks!

BR
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Something like this:

Excel Workbook
ABCD
1Subject:4IDs
21
32
4Do other Stuff3
54
65
76
87
Sheet1


If this isn't what you're looking for, maybe you could elaborate a bit.

HTH,
Roger
 
Upvote 0
Thanks much Barry! It works..what is that countif doing. My understanding of the function was that it counted cells that met a certain condition.
 
Upvote 0
It is. It's assuming it will come back with a result of 1 or 0. 1 meaning it's on the list. The IF funtion is using that value as a true or false indicator. When the count returns a value of one, the IF funtion reads that as TRUE (this ID is in the list). If the count function returns a 0, the IF function views that as FALSE (this ID is not on the list).

I know you didn't ask me, but I'm bored. :)

Barry, what if the count is over 1 (duplicate in the list)? Won't that mess up the IF function?
 
Upvote 0

Forum statistics

Threads
1,215,035
Messages
6,122,791
Members
449,095
Latest member
m_smith_solihull

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