les pink
les pink

Reputation: 21

Nesting IF statements

If the value in cell A1 is found in column B, then populate with the text 321 unless the value in cell A1 is found in column C, in which case populate with the text 121 instead. If the contents of cell A1 are not in either columns B or C, then populate with 0 or No.

This is half of the statement (unable to nest successfully with the other half of the statement):

=IF(ISNA(MATCH(A1,$B$1:$B$1000,0)),"","321")

Upvotes: 2

Views: 131

Answers (1)

pnuts
pnuts

Reputation: 59450

Please try:

=IFERROR(IF(VLOOKUP(A1,B:B,1,0)=A1,321),IFERROR(IF(VLOOKUP(A1,C:C,1,0)=A1,121),0)) 

Upvotes: 1

Related Questions