VLOOKUP formula

K

KLR

I have a workbook with 2 sheets - sheet 1 and sheet 2. I have a blank
column in sheet 1 (B), which I want to fill with info from column B in
sheet 2, but ONLY is the info in column A in sheet 2 matches with info
in column C in sheet 1. I think I should be using VLOOKUP and had a
go with the following formula

=IF('A20'!A2=('Course Notes'!C5),VLOOKUP('A20'!A2,'A20'!A1:D4467,2))

But it didn't work. Can someone please help or point me in the right
direction?
 
F

Frank Kabel

Hi
try
=IF(ISNA(MATCH(A20,'A20'!C2:C4467,0)),"no
match",INDEX('A20'!B2:B4467,MATCH(A20,'A20'!C2:C4467,0)))
 
B

BrianB

So you have a value in Sheet1 column C to look up in sheet 2 column
and return the value from sheet 2 column B (is that right ?).

The standard formula for this would be (in column B or anywhere else i
the same row):-
=VLOOKUP(C1,Sheet2!$A$1:$D$4467,2,FALSE)

This, however gives #N/A if no match found, so we use something lik
this, which traps the "error" and puts 0 instead :-

=IF(ISERROR(VLOOKUP(C1,Sheet2!$A$1:$D$4467,2,FALSE)),0,VLOOKUP(C1,Sheet2!$A$1:$D$4467,2,FALSE)
 
Top