Match or Lookup formula help please

S

Soth

Column A Column B Colum C

John John = return value of 1, if matches, else 2
Smith Bob
Mary Jennifer

I like to have a formula in column C, if item in column A, "John" matches
item in column B "John", then show value of #1, else, #2

Thank you,
Soth
 
T

T. Valko

Do you mean items that match *on the same row* or do you mean items that
match *anywhere* within the range?
 
T

T. Valko

Try this:

=IF(COUNTIF(A$1:A$20,B1),1,2)

Copy to the end of data in column B. Adjust ranges to suit.
 
D

dan dungan

Hi Soth,

If your list starts in A1, adjust $b$1:$b:$3 to accommodate the entire
list and past the formula below down column c?

=IF(ISERROR(MATCH(A1,$B$1:$B$3,FALSE)),2,MATCH(A1,$B$1:$B$3,FALSE))

Does this work for you?

Dan
 

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