Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2014, 07:42 PM
Authorized User
 
Join Date: May 2009
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Base entries in a crop down list on a cell value

I have a spreadsheet in which there will multiple drop down (combo) boxes. I understand how to build a combo box and refer to the range where the drop down lists lives. But in this series of drop downs, I want subsequent ones to be different depending upon what the selection was in the first drop down.

That is, if the first drop down has options 1, 2, 3 and 4,
I want the second drop down to show a different list ( a different cell range) depending upon the selection in the first drop down.

So it the user selects 1 in the first drop down, I want them to see list A in the second drop down.
If the user selects 2 in the first drop down, I want them to see list B in the second drop down.
And so on.

For what it is worth, there will always be more than two options, so Select Case rather than IF would be required. I confess that I am more accustomed to Access than Excel and am not sure where or how to put any code. In looking through the web, I am not seeing any pages that tell how to do this for a combo box in Excel.

I assume that the condition would be written something like
CASE C1 = 1
Code for the range to use for the drop down
CASE C1 = 2
Code for the range to use for the drop down
Etc.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I Crop An Image in ASP Lucy Classic ASP Professional 9 January 20th, 2011 01:40 AM
I need to refer a cell within a cell like =RC[ RC2 chakravarthi_os Excel VBA 1 September 24th, 2006 08:19 AM
Lose cell Text when editing cell in VSFlexGrid 6 bobcratchet VB How-To 0 July 30th, 2004 09:32 AM
crop image caster11 ASP.NET 1.x and 2.0 Application Design 1 November 12th, 2003 04:36 PM
Remove entries in a list box rfinks Classic ASP Basics 1 October 15th, 2003 12:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.