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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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")
 
Upvote 0
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...
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,553
Members
449,038
Latest member
Guest1337

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
Back
Top