SOLVED

help to create 1 single formula from IF function (x2) + VLOOKUP

Copper Contributor

Hi everyone!

 

I have 2 IF formulas containing VLOOKUP that I want to merge into a single one.

But I keep having N/A errors.

 

The 2 formulas are the following:

 

=IF(VLOOKUP($C$2,JFCIT!$A$2:$I$229,1,FALSE)=$C$2,($C$12*$C$10),0)

=IF(VLOOKUP($C$2,JFCIT!$A$230:$I$315,1,FALSE)=$C$2,($C$15*$C$10),0)

 

 

Context:

-In cell C2 I write a code.

-There is another excel sheet in the same workbook called JFCIT. It lists all the codes that I might write in C2.

-If the code I enter in C2 is listed in JFCITA A2:A229 then I want as output C12*C10.

  If the code I enter in C2 is listed in JFCITA A230:A315 then I want as output C15*C10.

-The cell where I want the output (so the cell where to put the single formula) is C16Screenshot.PNG

 

Can someone please help me?

Thank you

Viviana

 

2 Replies
best response confirmed by VivianaS (Copper Contributor)
Solution

@VivianaS 

IF(ISNUMBER(MATCH($C$2,JFCIT!$A$2:$A$229,0)),$C$12,IF(SNUMBER(MATCH($C$2,JFCIT!$A$230:$A$315,0)),$C$15,0))*$C$10

It works perfectly...thank you, thank you, thank you!!! <3<3<3

1 best response

Accepted Solutions
best response confirmed by VivianaS (Copper Contributor)
Solution

@VivianaS 

IF(ISNUMBER(MATCH($C$2,JFCIT!$A$2:$A$229,0)),$C$12,IF(SNUMBER(MATCH($C$2,JFCIT!$A$230:$A$315,0)),$C$15,0))*$C$10

View solution in original post