Finding the value of a cell in an entire worksheet

J

Jon

I have a workbook that has two sheets. The first sheet is called
'Objects' and the second sheet is called 'RawData'. The 'Objects'
sheet has values down the A column. There are about 4,000 rows. The
values are just simple strings.

In the 'RawData' sheet, I just have output of code from an entire
application. So basically, it is a bunch of text.

How can I find out if the string in A1 (then A2, A3, A4....) exists
anywhere within the 'RawData' sheet? If it does exists then I just
want to put a '***' (or any type of flag) on B1 (or B2, B3, B4...) in
the 'Objects' sheet, and if the string isn't in the 'RawData' sheet,
then leave cell B1 blank.

Thank You,
Jon Wetzel
 
R

Ron de Bruin

Sorry for the wrong formula

=IF(COUNTIF(RawData!A:A,A1)>0,"exist","not exist")
 
J

Jon

That works if the string I am searching is in the other sheet in a cell
by itself. However, if the string I am looking for is going to be in
the middle of other text, then it won't work. 99% of the time the
string will be mixed in with other text.

For example: The objects sheet contains a list of table names. And
the raw data is the export of Powerbuilder Powerscript code. I want to
see which tables are referenced by embedded SQL in the code. So, if I
am searching for the EMPLOYEE table, it would exist in a cell that
looks like this ---> "Select name, address, zip from EMPLOYEE where
name = 'Jon'" Does this make better sense?

I should have been more specific in my first post.

Thanks for your help so far.
 
K

krupesh

Hi

You can use this Functions

if(iserror(vlookup(lookup vlaue, lookup in raw data, Column No.,
false)),,"****")
This function is write Zero Where there is no match and put *** where
there is matching value is available.

Regards
Krupesh
 
P

Peo Sjoblom

=IF(COUNTIF(RawData!A:A,"*"&A1&"*")>0,"exist","not exist")

--
Regards,

Peo Sjoblom

Portland, Oregon
 
J

Jon

Thank you, Peo.


=IF(COUNTIF(RawData!A:A,"*"&A1&"*")>0,"exist","not exist")

WORKED BEAUTIFULLY.
 
Top