Solved

Data Validation with If tests?  Data Validation?   or VBA?  Something easier?

Posted on 2015-02-23
1
58 Views
Last Modified: 2015-03-02
I have a workbook (attached) that has two entries in column A (apples and pears).  Varieties  of apples and pears are in column B
If a user selects Apple in column A.  I would like the column B drop down list to show all the various types of apples  in the
If the user selects Pears in column A, I wouuld like the drop down list in column B to only show the various types of pears.
Can someone help me with this in either VBA or Data validation, or something else.
H--error.xlsx
0
Comment
Question by:brothertruffle880
1 Comment
 
LVL 29

Accepted Solution

by:
gowflow earned 500 total points
ID: 40626649
ok here it is

I created a name range Level1 that have Apples and Pears and changed the disposition a little bit and Level2 have the details of Level1.

The cells that have the validation are A1 for Level1 and B1 for Level2 and here are the formulas

A1 validation formula
=Level1

B1 validation formula
=OFFSET(INDEX(Level2,1,MATCH($A$1,Level1,0)),0,0,COUNTA(INDEX(Level2,,MATCH($A$1,Level1,0))))

so choose any item in A1 and see B1 values.

gowflow
H--error.xlsx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now