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
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

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...
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,111
Messages
5,835,444
Members
430,356
Latest member
RadStorm20

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top