views:

50

answers:

1

Kindly check the below written formula, if the formula is not correct then please provide me the correct one that is related to this.

IF(A1:AV7000=F1,vlookup(f2,B1:C7000,2,0),0)

As I have tried above written formulas, but it's not working.

+1  A: 

You can't compare a range of cells like A1:AV7000 directly to a single cell like F1. I suspect that you probably want to combine a VLOOKUP on the first range with the ISNA function, perhaps?

=IF(ISNA(VLOOKUP(F1,A1:AV7000,1,FALSE)),0,VLOOKUP(F2,B1:C7000,2,FALSE))

As written, however, this formula is nonsense. You are looking for the value in cell F1 but the range A1:AV7000 contains F1 so the VLOOKUP is always going to succeed

barrowc