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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,213,558
Messages
6,114,296
Members
448,564
Latest member
ED38

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