IF value in column matches another column, then insert text

Rick187

New Member
Joined
Aug 29, 2018
Messages
15
Hi,

Is there a formula that will insert specific text in a cell if any of the cells from column A are equal to the names in Column B?

For example

Column A contains

123
456
789

Column B contains:

471
871
951
123
456

the last 2 cells in column B (123, and 456) are also in Column A somewhere.

Column C next to the cell from Column B that says 123 will display "matching", and against 456 will also display "matching" but the rest of the cells in column C won't display anything.

Is this possible to do with a formula please?

Any help would be appreciated.

Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
CellFormula
C2=IFERROR(IF(MATCH(B2,$A$2:$A$20,0)>0, "matching",""),"")

<tbody>
</tbody>


Copy the formula down.
 
Upvote 0
Hi,

You can use COUNTIF.

Change/adjust cell references/range as needed, formula copied down.


Book1
ABC
1123471 
2456871
3789951
4123matching
5456matching
Sheet542
Cell Formulas
RangeFormula
C1=IF(COUNTIF(A$1:A$3,B1),"matching","")
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,213
Members
448,554
Latest member
Gleisner2

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