not sure how can I describe my question, please help!

mxc668

New Member
Joined
Jun 12, 2008
Messages
5
If I had column A and column B, how could I write a formula in Column C to decide whether cell 1 in column B is also in Column A as well? If yes, return value 1 to Column C otherwise return value 0.

Column A Column B Column C
a b 0
d c 1
c a 1
e f 0
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Welcome to the board...

Countif should do that for you...

In C1
=IF(COUNTIF(A:A,B1)>0,1,0)

Fill down

Hope that helps
 
Upvote 0
In column C put and copy it down

=IF(COUNTIF(B:B, A1), 1, 0)

HTH


Dave


P.S. Welcome to the Board
 
Last edited:
Upvote 0
Also, I did this with an array formula in column C:
Code:
=IF(ISERROR(MATCH(B1:B4,A1:A4,0)),0,1)
Just another way of doing it!
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,712
Members
449,093
Latest member
Mnur

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