IF statement help

  • Thread starter Thread starter pmg2003
  • Start date Start date
P

pmg2003

I am try to create a IF statement thats works as follows:

The workbook has 2 sheets

if A1 on sheet #1 equals any cell in column A on sheet #2 then display
the value of the adjacent B cell of sheet #2 on the B2 cell of sheet #1

I hope this makes sense....

TIA,

Paul
 
=IF(COUNTIF(Sheet2!A:A,A1),VLOOKUP(A1,Sheet2!A:B,2,0),"Not
Found")

HTH
Jason
Atlanta, GA
 
=IF(ISERROR(OFFSET(Sheet2!B1,MATCH(A1,Sheet2!A:A,0)-1,0)),"",OFFSET(Sheet2!B
1,MATCH(A1,Sheet2!A:A,0)-1,0))

in cell b2 sheet 1 Just 1 way
R
Pete
 
SORRY CELL A2

OZDOC1050 said:
=IF(ISERROR(OFFSET(Sheet2!B1,MATCH(A1,Sheet2!A:A,0)-1,0)),"",OFFSET(Sheet2!B
1,MATCH(A1,Sheet2!A:A,0)-1,0))

in cell b2 sheet 1 Just 1 way
R
Pete
 
Another Way,

In B2 put
=VLOOKUP(A1,Sheet2!A1:B50,2,FALSE)

Adjust A1:B50 for your range

Returns #N/A if no match is found so if you wanted something
else to be in B2 if no match is found

=IF(ISNA(VLOOKUP(A1,Sheet2!A16:B21,2,FALSE)),
"Something Else", VLOOKUP(A1,Sheet2!A16:B21,2,FALSE))

Dan E
 
cool.. thanks everyone!!!!

Dan E said:
Another Way,

In B2 put
=VLOOKUP(A1,Sheet2!A1:B50,2,FALSE)

Adjust A1:B50 for your range

Returns #N/A if no match is found so if you wanted something
else to be in B2 if no match is found

=IF(ISNA(VLOOKUP(A1,Sheet2!A16:B21,2,FALSE)),
"Something Else", VLOOKUP(A1,Sheet2!A16:B21,2,FALSE))

Dan E
 
Back
Top