Really bad with formulas... need help please :-)

C

cwinship

Hello everyone,

I'm really bad with formulas but I am sure this is possible. I hope this is
possible

I need a formula that will look at a text value in any given cell, A2 of
Sheet 2 for example, and search and tell me if that same text value appears
in ANY row of Column B on sheet 1, and if so return a 1(yes) or 2(no) type
result,

Is this possible? Looking around it seems like VLOOKUP coul be used to do
what I need but I don't follow the logic required.

Any help greatly appreciated
 
Y

Yong Heng

assuming your reference text is in column B1:B100 of Sheet1

formula is as follows:
=IF(ISERROR(VLOOKUP(Sheet2!A2,Sheet1!B1:B100,1,FALSE)),"No","Yes")
=IF(ISERROR(VLOOKUP(Sheet2!A3,Sheet1!B1:B100,1,FALSE)),"No","Yes")
=IF(ISERROR(VLOOKUP(Sheet2!A4,Sheet1!B1:B100,1,FALSE)),"No","Yes")
 
D

Dave Peterson

Since you're only look for a match, you can use =match() instead of =vlookup().

=if(isnumber(match(a2,sheet1!b:b,0)),1,2)

or if you could live with true/false
=isnumber(match(a2,sheet1!b:b,0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top