How to put a formula in a cell if a particular item is selected from drop-down list?

shadab841

New Member
Joined
Nov 17, 2020
Messages
11
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Okay, I work in a logistic company
and there is an excel sheet and i have to update the shipment cost and shipment type.
The thing is that there are three type of shipments


EU. Vat is applicable on this shipment

Non-Eu. No Vat

Domestic. Vat is applicable

So for the selection of shipment type in the excel sheet there is a drop-down list from where i have to select Eu shipment or Non-Eu shipment.

What I want is when I select EU or domestic the Vat row automatically calculates vat from the net value that is 20% of Net value.

And when i select domestic it automatically shows 0.

Is that possible, I've tried a lot but failed also am new to excel.
 

Attachments

  • IMG_20201118_014405.png
    IMG_20201118_014405.png
    14.1 KB · Views: 18

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
=IF( B2 = "Non Eu", 0 , C2*0.2)
Assuming its 20% for the other 2 dropdowns
 
Upvote 0
=IF( B2 = "Non Eu", 0 , C2*0.2)
Assuming its 20% for the other 2 dropdowns
Yes.

Can i use this in data validation?

Let me check normally btw thanks a lot bro I've been screwing with this for a long time.
 
Upvote 0
What do you want to use in data validation - the list ?
YES

Book3
BCDEFG
1Shipment typeNETVATData Validation List
2NON EU1000EU
3EU1000200NON EU
4NON EU100000DOMESTIC
5DOMESTIC10000020000
61000000 
710000000 
Sheet1
Cell Formulas
RangeFormula
D2:D7D2=IF(B2="", "", IF( B2 = "Non Eu", 0, C2*0.2))
Cells with Data Validation
CellAllowCriteria
B2:B7List=$G$2:$G$4
 
Upvote 0
What do you want to use in data validation - the list ?
YES

Book3
BCDEFG
1Shipment typeNETVATData Validation List
2NON EU1000EU
3EU1000200NON EU
4NON EU100000DOMESTIC
5DOMESTIC10000020000
61000000 
710000000 
Sheet1
Cell Formulas
RangeFormula
D2:D7D2=IF(B2="", "", IF( B2 = "Non Eu", 0, C2*0.2))
Cells with Data Validation
CellAllowCriteria
B2:B7List=$G$2:$G$4
You're the boss bro.
Thank you so much

maybe I don't know much about data validation but i was thinking that if that is possible so my cells remains empty as if there is no formula there but when i select eu shipment it calculates in the vat column as through data validation you can put the formulas by selecting custom.

Please correct me if i am wrong?
 
Upvote 0
You're the boss bro.
Thank you so much

maybe I don't know much about data validation but i was thinking that if that is possible so my cells remains empty as if there is no formula there but when i select eu shipment it calculates in the vat column as through data validation you can put the formulas by selecting custom.

Please correct me if i am wrong?
and is it possible if I by mistake calculate vat on NON EU shipment deleting the formula and it shows me a warning that "This is a NON-EU Shipment. Vat isn't applicable on this type of shipment" like in data validation we can put a warning message.
 
Upvote 0
maybe I don't know much about data validation but i was thinking that if that is possible so my cells remains empty as if there is no formula there but when i select eu shipment it calculates in the vat column as through data validation you can put the formulas by selecting custom.
That is the IF(B2="", ""
If blank then result is blank
 
Upvote 0
and is it possible if I by mistake calculate vat on NON EU shipment deleting the formula and it shows me a warning that "This is a NON-EU Shipment. Vat isn't applicable on this type of shipment" like in data validation we can put a warning message.
How would excel know that it should NOT be a NON EU ? and VAT is not Applicable , and if it knows that , then why do you choose the dropdown, as it can be done automatically based on the "other" criteria that identifies a mistake
 
Upvote 0

Forum statistics

Threads
1,215,003
Messages
6,122,655
Members
449,091
Latest member
peppernaut

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