checking if value exists inside a cell

Terrible

New Member
Joined
Sep 14, 2010
Messages
19
Hi,

I've got a list of 2000 items in sheet1 col A and in another sheet I've cut and pasted the contents of a text file there (sheet2). What I'd like to do is to check whether the items in the list are present in that file. I've tried using IF(COUNTIF etc.) but the problem is that it checks to see if the value of the cell matches a cell in sheet2.

In this case the value from the first sheet will not exactly match what is in the second sheet because there will be lots of other data in the same cell.

So for example in my list in col A I have the value BA01 and in the second sheet, there will be a cell which contains the text:-
932 JOB 00:00 - - A UKDOSVS FTP UK-REPS FTBA01AC FTBA01AC 02/10/2012 00:15:50

In this case I'd like BA01 in the first sheet to be have a one associated to it (or a "Y") but using IF(countif() doesn't seem to work unless the cell only contains "BA01".

What am I doing wrong?

TIA

Tony
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
If you want a 1 or 0, then this should work:

=(ISNUMBER(MATCH("*"&A1&"*",Sheet2!A:A,0)))+0

Excel Workbook
AB
1BA011
Sheet1
 
Upvote 0

Excel 2010
AB
1BA01Yes
Sheet1
Cell Formulas
RangeFormula
B1=IF(ISERROR(VLOOKUP("*"&A1&"*",Sheet2!A:A,1,0)),"","Yes")
 
Upvote 0

Forum statistics

Threads
1,203,665
Messages
6,056,638
Members
444,879
Latest member
suzndush

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