Microsoft Office

Microsoft Office Questions? Ask a IT Expert for Support ASAP

Ask a Computer Expert,
Get an Answer ASAP!

Microsoft Office
This answer was rated:

I would like to create a macro in Excel that creates a drop

down list based on the...
I would like to create a macro in Excel that creates a drop down list based on the value of another cell. My spreadsheet has a list of College subjects in a drop down list in cell (A2) using data validation. I would like cell (A1) to have a data validation list based on the value selected in cell (A2), and for this list to include Classes required for each College subject. I have defined names for each of the required classes on another sheet where I have collected all my data.

I have tried to use the INDIRECT formula in data validation, but this is resulting in an error. I will gladly attatch the worksheet for reference. I only need one example of the formula needed, as I know writing new VBA code can be complicated & expensive on this site. I would like to get an example of how to create this for the remainder of my data.
Show More
Show Less
Ask Your Own Microsoft Office Question
Answered in 7 hours by:
10/29/2013
kooleraid
kooleraid, Consultant
Category: Microsoft Office
Satisfied Customers: 124
Experience: Microsoft Office
Verified

kooleraid :

Hello and Thanks for Choosing JustAnswer!

kooleraid :

You do NOT need a macro to do this. I checked your history with JustAnswer and see that you already provided your sample Excel document before so I took the liberty of downloading that document from your previous question and fixing it up for you so that this works as you desire.

kooleraid :

Password XXXXX the Excel file I created for you is temp

kooleraid :

You can download it here: http://www.mediafire.com/view/cgvdy92gp84bbgb/Test.xlsx

kooleraid :

(1) On the SEP sheet you can now pick a degree in T9 and then M16 will dynamically let you pick a course that belongs only to that selected degree.

kooleraid :

(2) I also took the liberty of advancing your logic in your request such that if you have done step 1 above and a course is selected in M16 - it will NOT allow you to change the selected degree in T9 until you clear out the selected course in M16 thereby making sure you can never end up with a course that does NOT belong to a degree.

kooleraid :

Let me know! :)

Customer:

Wow! I had figured out the formula that needed to be added to the Data Validation so that this operation would work, but I hadn't thought about restricting the change of Subject in M16 so as not to cause any confusion. Genius!!

Customer:

Wow! I had figured out the formula that needed to be added to the Data Validation so that this operation would work, but I hadn't thought about restricting the change of Subject in M16 so as not to cause any confusion. Genius!! Now, copying the formatting to adjacent cells was a bit challenging, and I noticed a =IF(M16="",Categories,INDIRECT("FakeRange")) in the DV of T9. What does this "FakeRange" refer to? I can't find it to duplicate it to other spreadsheets.

kooleraid :

Its a dummy

kooleraid :

:)

kooleraid :

its doesnt exist

kooleraid :

hence it fails just as we want it to

kooleraid :

if cell is empty we set it to Categories range if not basically set it to nothing

Customer:

Wow! I love it. Now, I will have to transfer additional data over to your revised document, since I can't input your dummy range into my existing doc. This won't disrupt the formula will it?

kooleraid :

When you select the degree range and tell it to name it using the 1st row what will happen is the special characters such as " " "-" "(" ")" will get converted to "_" characters therefore when you then do an INDIRECT from a course range back to it - it will fail because you would end up comparing degrees in original form with course title row containing "_" subtitutes hence why it will complain and not work before. At least that was the error in your original spreadsheet. Therefore, a nested SUBSTITUTE command needs to be used to also remove those characters before INDIRECT is invoked in DATA VALIDATION for M16 such that it works.

kooleraid :

Well I removed stuff from the sheet before I sent it to you so not sure if there was anything relevant that cut in the process or not

kooleraid :

I removed things such as print ranges etc etc

Customer:

that's fine

kooleraid :

I wanted to simplify for you basically so you can see and focus on the dynamic listing

kooleraid :

There is no dummy range

kooleraid :

Its just a random name

kooleraid :

You can call it whatever

kooleraid :

It just has to be a range that does NOT exist

kooleraid :

so INDIRECT fails

kooleraid :

So all you need is the following

Customer:

So now that I'm adding more data to it, it's not responding. I want to make sure I can continue to add content to the "Catagories" range and also to the classes without dirupting the formula.

Customer:

wait

Customer:

I think it might be because I haven't named my ranges yet..hold on

kooleraid :

(1) open your xls (2) press ctrl F3, (3) delete the ranges you do NOT need, (4) go to data tab (5) re-define your ranges ie press Ctrl+Shift+F3 (6) go to T9 cell on SEP (7) Press ALT+D+L (8) Choose List enter formula from my xls (9) go to M16 cell on SEP (10) Press ALT + D + L (11) Choose List enter formula from my xls (12) Test :)

kooleraid :

in Data Validation pressing F8 should let you pick from existing categories

Customer:

ok, i'm missing a step (4), it won't allow me to select top row "Selection is not valid: copy and paste area cannot overlap; If you are using the Create from selection command...; If the names you are creating are listed in a row...; etc.

Customer:

wait...i think it's because my panes were frozen...hold on

Customer:

Nope...same error message...another tech said spaces aren't allowed in ranges?? But yours seemed to work fine with spaces..

kooleraid :

that is what I was explaining above - you have to use a nested SUBSTITUTE command and replace all special characters and spaces with "_"

kooleraid :

than call the INDIRECT(T9)

Customer:

ahhh! so I need to go into each cell in the top row of the worksheet and do this before "creating names from selection"

kooleraid :

no no

kooleraid :

you create the ranges as is

kooleraid :

just do the DATA VALIDATION formula with the SUBTITUTES

kooleraid :

in T9

Customer:

oh! okay

kooleraid :

oh wait

kooleraid :

meant in M16

kooleraid :

:)

Customer:

right!

kooleraid :

let me know if you can get it to work this time

Customer:

okay...just a sec

Customer:

Still can't get past the error message when I attempt to "Create Names From Selection". Could it be because I'm not deleting ranges I don't need? Step (3)...Can't quite determine which ones I need and don't need.

Customer:

I'll send you the revised spreadsheet so you can take a look

kooleraid :

select range by hand than press ctrl+shift+f3 n give it a name

Customer:

ok...that worked

kooleraid :

:)

Customer:

it had Left Column already selected and I was able to click ok

Customer:

moving on..one sec

kooleraid :

i named my ranges by top column

kooleraid :

i meant top row

Customer:

that's what I thought, but when I select top row I get the error again

Customer:

on the other hand...

Customer:

when I select column A, it allows me to create

Customer:

"Replace exising All_Subjects?"

Customer:

OKAY

Customer:

now I'm getting the "Named range you specified cannot be found" when copying your formula into the DV

kooleraid :

what did you name ur degrees as and what did you name your courses as?

kooleraid :

so i make i explain correctly

Customer:

degrees is named All_Subjects, courses are named by individual range names (i.e. Administration_of_Justice_AA)

kooleraid :

ok

kooleraid :

you can always press ctrl+f3 and delete the ranges you do not want and do it again

Customer:

okay...

Customer:

that's what I was afraid to do at first...thinking if it didn't work, I'd have to start all over :-/

kooleraid :

how many u did?

Customer:

so far, about subjects, but as you can see, I have over 100 subjects. If I can get the formula to work I can just copy down to additional cells

Customer:

*13 subjects

kooleraid :

im not sure if i follow

kooleraid :

you have 2 cells in SEP you need formulas in

kooleraid :

rest of it

kooleraid :

just create 1 degree column

kooleraid :

and column for each class listing its courses under it

kooleraid :

thats it

kooleraid :

u create a range per column in data by hand

Customer:

okay...thanks so much!

kooleraid
kooleraid, Consultant
Category: Microsoft Office
Satisfied Customers: 124
Experience: Microsoft Office
Verified
kooleraid and 87 other Microsoft Office Specialists are ready to help you
Ask your own question now
Ask kooleraid Your Own Question
kooleraid
kooleraid
kooleraid, Consultant
Category: Microsoft Office
Satisfied Customers: 124
124 Satisfied Customers
Experience: Microsoft Office

kooleraid is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

jstinehelfer

jstinehelfer

Information Systems Manager

36 satisfied customers

A+ Comptia Certified computer repair

JasonJames122

JasonJames122

Computer Enthusiast

0 satisfied customers

I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business

Jess M.

Jess M.

Computer Support Specialist

684 satisfied customers

Computer Software Specialist for more than 10 years

The-PC-Guy

The-PC-Guy

Computer Manager

579 satisfied customers

20 years experience providing remote computer support

James K.

James K.

Consultant

260 satisfied customers

Technical Director of IT Company

IT Miro

IT Miro

Computer Scientist

156 satisfied customers

Bachelor's Degree in Information Technology, Microsoft Certified Professional

Chris L.

Chris L.

Support Specialist

143 satisfied customers

Certified Expert with over 10 years experience.

< Previous | Next >

Related Microsoft Office Questions
I have windows 10, i have 2013 word and I can not save any
I have windows 10, i have 2013 word and I can not save any documents to my computer. Why? … read more
Richard
Richard
IT Manager
IT Manager, Consultant
3,208 satisfied customers
I ncan't access my hotmail account and my microsoft office
Hi I ncan't access my hotmail account and my microsoft office is not working … read more
Josh
Josh
It Support Specialist
Associate Degree
5,127 satisfied customers
Regarding a notification concerning my Office 365 personal
regarding a notification concerning my Office 365 personal Subscription to be renewed on November 20, 2017. The question is I thought I had cancelled the subscription some time ago. Please connect wit… read more
Kamil Anwar
Kamil Anwar
IT Consultant / Systems Engineer
Bachelor\u0027s Degree
426 satisfied customers
After finishing my research essay I save it and proceed to
Hi, after finishing my research essay I save it and proceed to turn it in electronically. It could not be uploaded into the system. When I checked the desktop where the file was stored. I could not fi… read more
Kris R
Kris R
IT Manager
Computing
2,263 satisfied customers
I am attempting to create a 72- page rooster using Publisher
I am attempting to create a 72- page rooster using Publisher 2016. Several iterations have gone well and now when I attempt to merge the boilerplate section to the people-bio section during the merge … read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
I have tried 10 times today to install the Office 365 I
I have tried 10 times today to install the Office 365 I bought for my Mac and even though I forgot and asked to replace my password ***** and over, when I get Office 365 downloaded and I have to put i… read more
Jess M.
Jess M.
Computer Support Specialist
Bachelor's Degree
684 satisfied customers
I have Microsoft Office Word 2007. I have formatting
I have formatting problems. I get gaps with I can not get rid of. What can be done to remove them? … read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
I currently have MSPublisher 2003 and am considering
I currently have MSPublisher 2003 and am considering updating it. Wil the latest version of Publisher be an improvement and usable say after 2017 or must it be up dated yearly and will it also be usab… read more
The-PC-Guy
The-PC-Guy
Computer Manager
Bachelor's Degree
579 satisfied customers
Have a question with spelling/grammar. HP Laptop
Have a question with spelling/grammar. JA: What kind of computer do you have? Customer: HP Laptop JA: Have you installed any updates recently? Customer: Yes JA: Anything else you want the Microsoft Of… read more
Jess M.
Jess M.
Computer Support Specialist
Bachelor's Degree
684 satisfied customers
I am having huge issues with excel since last week. I use a
I am having huge issues with excel since last week. … read more
Jason Jones
Jason Jones
AAS Information Technology
6,316 satisfied customers
In previous versions of Excel, I have been able to let say
Hello, in previous versions of Excel, I have been able to let say for instance … read more
The-PC-Guy
The-PC-Guy
Computer Manager
Bachelor's Degree
579 satisfied customers
I have an excel spreadsheet file with rows that have
I have an excel spreadsheet file with rows that have people's names, dates of birth, and colleges they graduated from. Is there a command I can enter that will search the college column for a list of … read more
bbao
bbao
Freelance IT Consultant
74 satisfied customers
I am using Word 2011 although I have upgraded to Office 365.
I am using Word 2011 although I have upgraded to Office 365. I am trying to use mail merge from my Exce document to word to print our card addresses. I don't find Mail Merge. Perhaps you could help. … read more
Richard
Richard
IT Manager
IT Manager, Consultant
3,208 satisfied customers
I am working in excel and a vlookup. I am trying to format
Good afternoon, I am working in excel and a vlookup. I am trying to format my colum to work with my v lookup but i keep having to double clic on my cell to get a little green triangle on the corner and then my file work. How could i copy a whole colum to the right format? … read more
Jason Jones
Jason Jones
AAS Information Technology
6,316 satisfied customers
I received a laptop for my retirement gift. It is now one
I received a laptop for my retirement gift. It is now one year later, and the subscription for Office 365 Personal provided with the gift expires on 22 November 2017. How do I renew? Is it necessary to renew? … read more
Byron
Byron
IT Support Specialist
Bachelor\u0027s Degree
409 satisfied customers
I have a spreadsheet with 10 columns with 30 rows. The
I have a spreadsheet with 10 columns with 30 rows. The columns add correctly however when I add the totals across the rows one number in one of the columns is not included in the sum. I have used EXCE… read more
Jason Jones
Jason Jones
AAS Information Technology
6,316 satisfied customers
Since earlier this afternoon, I cannot open ANY of my Word
Since earlier this afternoon, I cannot open ANY of my Word .docx files, including files I've opened before. I keep getting a message about possible invalid files names (they're not invalid) as well as… read more
Jason Jones
Jason Jones
AAS Information Technology
6,316 satisfied customers
I have Microsft's work processing program "Works". I need
I have Microsft's work processing program "Works". I need help to number pages of my document that consists of 76 pages. … read more
Josh
Josh
It Support Specialist
Associate Degree
5,127 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x