Auto Insert Data Validation Based On Cell Data

DKTRL

Board Regular
Joined
Jul 21, 2013
Messages
153
Hi,

I have create a Order Form and need some help. this order form is for customer to choose the items that they are going to buy. and for certain items we giving them 1 or 2 free gift but not for all.

MySheets1 ("A19") is for choosing the products "Data Validation List"

What i want is that, base on difference products that the customer select in ("A19") i want Cell A25 or A25 & A26 to add data validation list from Sheets2

if Sheets1 ("A19") select = "Products 1" then Sheets1 ("A25") automatically add data validation list from sheets2 A1:A20

if Sheets1 ("A19") select = "Products 2" then Sheets1 ("A25") & ("A26") automatically add data validation list from sheets2 B1:B20 & C1:C20

if Sheets1 ("A19") select = "Products 3" then Sheets1 ("A25") No data validation added

if Sheets1 ("A19") select = "" then Sheets1 ("A25") No data validation added



Any Help Will Be Appreciate.
 
Hi DKTRL. I think that I may have something for you. Click here to download a dummy file that I have set up. I just want to point out a few things. The ranges A19:A20 and A25:A30 are unlocked and the sheet is protected (with no password at this time). In Sheet 2 I have set up 3 columns as dummy sources for your validation lists. Column C will populate cells A19, A 20 and A21. Column A will populate cells A25, A27 and A29. Column B will populate cells A26, A28 and A30. Please note that in Column C I have added the number 1 for items 1 to 11 and the number 2 for items 12 to 15. Items 16 to 20 can be left as they are. You will also see a 'Re-Set' button that when clicked, will enable the drop down lists in A19 and A20 after they have been disabled. Keep in mind that I wrote this code without seeing your actual sheet and so it will most likely have to be modified to suit your particular situation. Try it out as it is by clicking in A19 and making a choice from the drop down list. Then make choices from the various drop down lists that are created in the other cells to see if it is working as you described. Please let me know how it works out.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi DKTRL. I think that I may have something for you. Click here to download a dummy file that I have set up. I just want to point out a few things. The ranges A19:A20 and A25:A30 are unlocked and the sheet is protected (with no password at this time). In Sheet 2 I have set up 3 columns as dummy sources for your validation lists. Column C will populate cells A19, A 20 and A21. Column A will populate cells A25, A27 and A29. Column B will populate cells A26, A28 and A30. Please note that in Column C I have added the number 1 for items 1 to 11 and the number 2 for items 12 to 15. Items 16 to 20 can be left as they are. You will also see a 'Re-Set' button that when clicked, will enable the drop down lists in A19 and A20 after they have been disabled. Keep in mind that I wrote this code without seeing your actual sheet and so it will most likely have to be modified to suit your particular situation. Try it out as it is by clicking in A19 and making a choice from the drop down list. Then make choices from the various drop down lists that are created in the other cells to see if it is working as you described. Please let me know how it works out.


Hi mumps, thank for the code, i will give it a try and get back to you.


Thanks
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

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