# Does A Value in Column A Exists in column B Yes/No should be in Column C

#### maslam15

##### New Member
Hello Everyone,
I am trying to find out the formula if the values I have in Column A Exists in Column B Should Say Yes/No in Column C. Please see an excel table below.

 ID ID2 Does ID in column A exist in Column B 112 112 Yes 111 115 No 113 114 Yes 114 113 Yes
Thank you,

### Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

#### Fluff

##### MrExcel MVP, Moderator
=if(isnumber(match(a2,b\$2:b\$10,0)),"Yes","No")

#### denzo36

##### Board Regular
Hi try

={IF(OR(A2=\$B\$2:\$B\$5),"Yes","No")} - enter formula with Ctrl+Shift+Enter

#### ahennema

##### New Member
I just ran the above formula: IF(OR(A2=\$B\$2:\$B\$5),"Yes","No") and did not need the CTRL+SHIFT+ENTER, in fact it did not work with CTRL+SHIFT+ENTER

#### denzo36

##### Board Regular

You can enter the formula without ctrl+shift+enter but it will not work, you need to ctrl+shift+enter as it's an array formula. You may need to adjust your range for column B if it's larger than the range shown in your post.

The formula should be in column C2 and filled down. I did it here and it works fine

#### Fluff

##### MrExcel MVP, Moderator
If you have dynamic arrays, then you don't need to use CSE
+Fluff.xlsm
ABCD
1DID2Does ID in column A exist in Column B
2112112YesYes
3111115NoNo
4113114YesYes
5114113YesYes
Report
Cell Formulas
RangeFormula
C2:C5C2=IF(ISNUMBER(MATCH(A2,B\$2:B\$10,0)),"Yes","No")
D2:D5D2= IF(OR(A2=\$B\$2:\$B\$5),"Yes","No")

#### maslam15

##### New Member
Thank you everyone the formula worked for me

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks fro the feedback

Replies
0
Views
38
Replies
0
Views
107
Replies
5
Views
145
Replies
12
Views
155
Replies
7
Views
75

1,128,052
Messages
5,628,315
Members
416,311
Latest member
S991102

### 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.

### Which adblocker are you using?

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

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