If statement with Vlookup

roaze2000

New Member
Joined
Jul 19, 2005
Messages
49
Hi Guys and girls...

I have the following formula:
=IF((VLOOKUP(C85,AO$1:AP$83,2,FALSE))=(VLOOKUP(B85,AJ$1:AM$12,2,FALSE)),(VLOOKUP(P85,AK$1:AM$12,3,FALSE)/100*O85),"nothing")

which should do the following:
Lookup if a product came from a certain country and see if it is the same as the country where the customer lives.

If yes, it should lookup that countries VAT and multiply it.
If no, it should put Nothing in the cell.

The problem is, is that in the true section, the cell value already mentions the outcome and can therfor not crossreference the table with Vat values.

How can I solve this???

thanks to help!
Dennis
 

Some videos you may like

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
I'm not sure I've completely grasped this but perhaps you need yet another lookup :)

=IF(VLOOKUP(C85,AO$1:AP$83,2,0)=VLOOKUP(B85,AJ$1:AM$12,2,0),VLOOKUP(VLOOKUP(C85,AO$1:AP$83,2,0),AK$1:AM$12,3,0)/100*O85,"nothing")
 

roaze2000

New Member
Joined
Jul 19, 2005
Messages
49
Oh....got it.....

=IF((VLOOKUP(C77,AO$1:AP$83,2,FALSE))=(VLOOKUP(B77,AJ$1:AM$12,2,FALSE)),(VLOOKUP(VLOOKUP(C77,AO$1:AP$83,2,FALSE),AK$1:AM$12,3,FALSE)/100*O77),"nothing")

forgot to add the actual value I was looking up in the first place...

Dumb huh...
 

Watch MrExcel Video

Forum statistics

Threads
1,118,028
Messages
5,569,741
Members
412,289
Latest member
Kingchaos64
Top