Advertisement

06.10.2008 at 06:33AM PDT, ID: 23472226
[x]
Attachment Details

Data validation dropdown using VBA rather than excel formulas

Asked by NicBrambles in Microsoft Excel Spreadsheet Software, VB Script

Tags: Microsoft, Excel, 2003, VBA

Hello,
I have two dropdown boxes with the second being dependent on the first choice.  Before I only had two outcomes and so was able to use the code below.

if(F9="Package",INDIRECT("P3:P6"),INDIRECT("Q6")    

However I would now like to have more possible outcomes.

If B7 = "RP" or "IC" then choose from anyone of P3:P6
If B7 = "CK"           then choose from either P8 or P9
If B7 = "OC" or "EB" or "CA" or "CO" then "Not Required"

I don't know how to do it in excel but would prefer to have a piece of VBA as I would also like to colour to change to grey when the cell says "Not Required".

One extra problem is that I'm really new to VBA so only know how to insert it to a button with a macro attached but not into something like this, so some guidance here would be much appreciated.

Thank you.Start Free Trial
[+][-]06.10.2008 at 08:02AM PDT, ID: 21751917

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.10.2008 at 08:19AM PDT, ID: 21752091

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.10.2008 at 08:30AM PDT, ID: 21752204

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.10.2008 at 08:33AM PDT, ID: 21752243

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.10.2008 at 08:43AM PDT, ID: 21752328

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, VB Script
Tags: Microsoft, Excel, 2003, VBA
Sign Up Now!
Solution Provided By: chris_bottomley
Participating Experts: 1
Solution Grade: B
 
 
[+][-]06.11.2008 at 02:24AM PDT, ID: 21758080

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628