Looking for Range in Logical Test of IF statement

stevman22889

New Member
Joined
Feb 2, 2015
Messages
1
Hello,

I am having issues with an if statement. Instead of using something absolute (aka, =if(cell1=cell2,)), I need a way to include a range. I need the logical test part of the statement to search for whether or not that specific value is within a range, rather than looking for whether it equals a specific cell/column.

Basically, I want to use something like this =if(cellA value is in columnB),1,"").

I know it's probably pretty easy, but I am struggling to figure out how I can pull this off. Any help is greatly appreciated!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi Welcome to the Forum!

You could try - for example:

=IF(ISNUMBER(MATCH(A1,B:B,0)),1,"")
 
Upvote 0

Forum statistics

Threads
1,216,225
Messages
6,129,597
Members
449,520
Latest member
TBFrieds

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