Filling drop down box

hi,

I have a drop down box in a cell. Based on a value of 
anohter cell I have to fill my drop down box. what i mean 
is, say if  
GreeNPackage is "No" then I want the drop down box to fill 
a range of values. But if the GreeNPackage is "Yes" then I 
want the drop down box to fill another set of values. how 
can i do this?

plenty of thanks

0
anonymous (74722)
11/25/2004 7:37:51 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
261 Views

Similar Articles

[PageSpeed] 46

See reply in .Functions

Biff

>-----Original Message-----
>hi,
>
>I have a drop down box in a cell. Based on a value of 
>anohter cell I have to fill my drop down box. what i mean 
>is, say if  
>GreeNPackage is "No" then I want the drop down box to 
fill 
>a range of values. But if the GreeNPackage is "Yes" then 
I 
>want the drop down box to fill another set of values. how 
>can i do this?
>
>plenty of thanks
>
>.
>
0
biffinpitt (3172)
11/25/2004 8:37:00 AM
Instead of drop down you can use data validation list and create to
set of range names:

First will have value yes and no and then we will have to create to
other ranged names, named yes and no. in those ranges you keep your
parameters that you want to show as option to users.

Then in the cells where you want to have yes/no answer you set data
validation to you Ye/no named range. Then in the cell where you want
to show values for yes or no, you set data validation to
=(indirect([Address of yes/no cell]). So when the user is selecting
let's say yes, the list validation will be set by indirect to named
range yes.

This method will avoid writing any VB code..

If any questions, contact me.

Regards,

Nick


<anonymous@discussions.microsoft.com> wrote in message news:<1d0501c4d2c1$aadfc7d0$a501280a@phx.gbl>...
> hi,
> 
> I have a drop down box in a cell. Based on a value of 
> anohter cell I have to fill my drop down box. what i mean 
> is, say if  
> GreeNPackage is "No" then I want the drop down box to fill 
> a range of values. But if the GreeNPackage is "Yes" then I 
> want the drop down box to fill another set of values. how 
> can i do this?
> 
> plenty of thanks
0
nrogojina (1)
11/25/2004 7:49:18 PM
Reply:

Similar Artilces:

Combo box to find records
Hi, need help with what I am sure is a simple problem. I have a form and wish to find records using a combo box. Which I know how to do. The problem is it takes me to "one" record. I would like to select, for example, employee name: John Smith and it return all records for John Smith while filtering out all other records. I would be thankful for any help. Thanks, Michael On Wed, 30 Jan 2008 20:24:04 -0800, Michaelchessking <Michaelchessking@discussions.microsoft.com> wrote: >Hi, need help with what I am sure is a simple problem. > >I have a form and wis...

CScrollBar box flicker problem
I put CScrollBar in CDialog and thumb button flickering all the time. Somone can help me? Tnx ...

Excel should allow auto shape boxes to be fixed to points on the g
I have constructed a graph that has data added to it daily. On the graph I have used several auto shape boxes to highlight key data milestones. Problem is every time I add new data the auto shape boxes move and have to be manually adjusted to repoint them to the relevant data point. Is there any way they can be fixed to the relevant data points on the graph so that they remain fixed to that point and therefore don't move/shift when new data is added? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for ...

How do to enter data in a combo box on a worksheet?
Use the dropdown arrow? Shereen wrote: -- Dave Peterson ...

Disable 'Macro' dialog box...
Thanks Geoff, for the info on how to protect the VBA code. Have one further question; Now that the workbook and code is protected, I have sub routines that are run from command buttons. However, it is still possible to push ALT-F8 to list my routines, then click on a routine, then choose 'Run'... Is there a way to disable this option, so that users can not view or run the list of available routines (I need them to run the routines, only from the command buttons). Ruskin You can do what you want by making each macro a Private macro. This will preclude that macro from appearing...

Combo Box Moves
I have 4 activeX control combo boxes on an Excel sheet (2 on the left and 2 in the middle) and if I print the sheet the 2 boxes thatbare in the middle move over to the left hand side. I have gone into the properties menu and they show as locked but it does not make any difference. Also when I print the sheet the 2 boxes on the left which were made the same size as the underlying cells print out smaller than the underlying cells. Can anyone help please? Hi John, See MSKB Article # 838910 (Controls move to the left of the worksheet in Microsoft Excel 2002) http://support.micr...

After Add Record, Put Cursor in specific Text Box
Hi, I had the wizard set up a button to add record (it puts in the code below in the On Click property of the button). I'd then like to have the focus go to text box [ProjectType]. I don't know how to do that. TIA :) Private Sub cmdAddRecord_Click() On Error GoTo Err_cmdAddRecord_Click DoCmd.GoToRecord , , acNewRec Exit_cmdAddRecord_Click: Exit Sub Err_cmdAddRecord_Click: MsgBox Err.Description Resume Exit_cmdAddRecord_Click End Sub Private Sub cmdAddRecord_Click() On Error GoTo Err_cmdAddRecord_Click If Me.Dirty Then Me.Dirty = False If ...

Creating drop down lists with multiple options?
I am trying in vain to create a drop down list where users can select more than 1 choice. For example, if the choices in a list which i named are as follows: Blue Red Green Yellow Purple How does one have the option to select any of the colors by themselves or any combination of all of them up? For example, if the question is what is your favorite color? How can a user choose Blue OR Red and Blue OR Red, Blue and Green and so on? Any help would be appreciated. That will require multiple cells. One cell will only hold 1 value. Any single cell solutions are going ...

Public Function to display in text box
Have public function (loaded in the global module) that produces a variable as a double. That all works fine as evidenced by the debug.print method in the immediate window. I desire to have the current value of the variable displayed in a text box. I created a callback function (loaded in global module) that looks like: Public Function GetCurrentWork_GPCI() As Double Dim CurrentWork_GPCI As Double GetCurrentWork_GPCI = CurrentWork_GPCI End Function I can't figure out how to make it display; I've currently got the control source property ...

How to disable drag & drop in CWebBrowser2 ?
I have followed the tutorial "Using MFC to Host a WebBrowser Control" at http://msdn.microsoft.com/workshop/browser/webbrowser/tutorials/wbtutorial.asp I'd like to disable drag & drop support. Currently, a word document/text document etc. can be dragged into the Window - which is not required. I have found the following text at http://msdn.microsoft.com/workshop/browser/hosting/wbcustomization.asp "If you don't want drag-and-drop support in your application, you can call IWebBrowser2::RegisterAsDropTarget, passing in VARIANT_TRUE, to prevent any drag-and-drop op...

Check Box Sizing
Hi, When using check boxes, no matter how much I resize the area, the actual check box itself never gets larger (only the area for a description does). Is there any way to increase the size of the check box so that a larger check mark appears on the worksheet? Thanks, Brad. Brad, If you select "move and size with cell" (on the properties tab) then you can resize the checkbox by increasing the column width and/or row height. Give my regards to Boston. HTH, Bernie MS Excel MVP "beantownbrad" <beantownbrad@discussions.microsoft.com> wrote in message news:C63B5725-...

drop down symbol and a database attached to it
I type in customer name every week in to a new worksheet( some times customers are not same as previous week) into a column. I like to know if there is a way to add a drop down symbol to each cell and a database of cutomer names, so that i can select the name from th list, thank for the help Data>Validation>Settings>Allow>List where you enter an equal sign and and a named range containing customer names, such as =MyCustomers OR refer to the range that holds the custimer names =M2:M100 OR list the names, each sparated by a comma and no spaces such as: sanik,Jim, etc. -- Greeting...

Drop shadow on Drawn Lines 2008
I post in the Acrobat forums at Adobe Forums. I gave suggestion for creating forms using either underscores or Leader Tabs to create Form elements to use in Acrobat Forms Wizard. Name: _____________ Address: _____________ and so on. I've been chastised mercilessly by another contributor That say doing that adds unnecessary Characters. the contributor suggested used Drawing lines. I tried on a Blank page using Drawing line after I found the correct menu. But I found a couple of things wrong. 1. There is no way to control the starting/ending points (does not...

Selecting only some of the drop down options
I have a form set up that uses a query as a records source. I have 5 different drop downs to choose from with the criteria in the query set up as like below to link to the form >=[Forms]![Selected Criteria Form]![Year] By setting up this way, you need to select something from all 5 drop down lists for it to work. How would I set it up where I could select anywhere from 1 to 5 of the drop down options? Not necessarily. There is a technique you can use that will solve that problem; however, I need to know if the drop downs are on the form you are filtering, or are you making s...

Text Box Updating
I am having trouble getting a text box to auto fill from a choice made from a combo box. Combo Box Name is Address_21 Text Box Name is City_1 My code is as follows: 'Auto Fill CES Spec Written Office Private Sub Address_21_Change() Select Case Address_21 Case ""2306 Long Green Court" City_1 = "Valrico" Case ""3440 Oakcliff Road" City_1 = "Atlanta" Case "7015 East 14th Aveneue" City_1 = "Tampa" Case "1800 Taylor Drive" City_1...

Populating a field using a pull-down/combo box menu
Hello all, I'm working on MS Excel. I am trying to find the source code for something that will allow me to do the following novel procedure with a pull-down menu and a text box: There is a pull-down menu, and another text box right besides the pull-down menu. The pull-down menu has the names of all the states in the USA in it. When one state is selected, the text box is automatically populated with the capital of that state. In MS Excel, I've created a novel way to handle this issue using Boolean logic. Unfortunately, I can only have 7 states in my pull-down menu, and the sour...

Programatically creating text box
Hi all..I need help regarding creating the edit box programatically.. I have drawn a movable rectangle in a view.Now how i want to make that rectangle editable..can any body show me some pointer/sample code? I was cocoa programmer. i know how to do this in mac os..but i dont know how do i o it in MFC.. please help me I took the source code for drawing from following link : http://www.codeproject.com/miscctrl/diagrameditor.asp Thanks in advance CEdit editbox; when you need it editbox.Create(...parameters here...) and when you are done with it, editbox.DestroyWindow(); or if you want ...

folder dialog box
hi; i am learning mfc and i want to make gui application that user selects a directory and app writes all the file names in this directory to a file recursively. i am not sure where to start can anybody help me where should i start? thanks;) Have a look at BrowseForFolder()" API and 'CFileFind' class members. Have a look at http://www.codeproject.com/cpp/BrowseForFolder.asp for help with some sample code. -Seetharam Seetharam wrote: > Have a look at BrowseForFolder()" API and 'CFileFind' class members. That's SHBrowseForFolder(). -- David Wilkinson ...

Multiple selection list box...
I have a multiple selection listbox on a dialog box. When the user picks the listbox items and clicks "OK" my program draws to the main screen. If the user reopens the previous dialog box, I want the previously chosen listbox choices to be highlighted. How would I do this? Thanks, RABMissouri Store the selection in a common place like the Document or MainFrame or the App and do the selection in the OnInitDialog() member function of your dialog. -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "RBert" <drbert@microcore.net> wrote in m...

Drop down list #7
How can you change the items in a list after you have made a selection in a previous list: i.e. if you select 1 in the first drop down you want the options in the next drop down to be A-K and if you select 2 you want the list to be L-M. See http://www.contextures.com/xlDataVal02.html -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "mudcat" <mudcat@discussions.microsoft.com> wrote in message news:D35E1462-ACFB-4B25-8156-16A393062990@microsoft.com... > How can you change the items in a list after you have made a selec...

auto-fill Contacts
Is there an add-on from Microsoft or others that can populate a New Contact with info from an Outlook 2002 e-mail, Word document, etc.? Bernie Unclear post. Clarify what you want to do and in what format the information currently exists. Look At File > Import and Export to see what file types can be imported. -- Russ Valentine [MVP-Outlook] "baltobernie" <bernie@pennstar54.com> wrote in message news:ARh4e.3622$%b1.630@trnddc08... > Is there an add-on from Microsoft or others that can populate a New > Contact with info from an Outlook 2002 e-mail, Word documen...

formulas from a drop down box
I was wondering if it is possible to have a list of formulas in a drop down box so that when I pick a formula, that is the one that is applied to that cell. Any help would be great. Lisa, The following uses a Combobox from the forms toolbar. It assumes that Combobox has been assigned a single column list range where the formulas are shown. The first item in that list should be a title, such as "Formulas", while the rest of the list should be the actual formulas without the leading equal sign "=". The linked cell for the combobox must also have been assigned. '----...

Inventory Items
Is there a way to indicate an item is a drop ship on the inventory card? -- HK Could you use one of the user categories? -- Jim@TurboChef "HK" wrote: > Is there a way to indicate an item is a drop ship on the inventory card? > -- > HK ...

Insert | File > Attachmnet-Button Drop Down ;What is the difference between Insert and Insert As Attachmnet
re: "Outlook2003, File-Insert-Options" On making new-email with Attachment-File(s), ** File Menu | Insert | File >>> (Brows and select File to insert ) then we can see the button "Insert", and write side Drop Down Arrow lower-right side of Dialog Box; If it clicked, we can see three options as follows: ** Insert Insert as text Insert as Attachment I can not recognize/understand the difference between "Insert" and "Insert as Attachment" *** What is the difference between Insert and Insert As Attachment ? I would appreciate y...

Data Validation drop-down list does not appear
I have an Excel workbook that has data validation lists. The sources for the lists are ranges. On one worksheet, the drop-down list does not appear on any cell with data validation. On all other sheets, data validation works fine. In Excel 97, if the cell with data validation is in a frozen pane of the window, the dropdown won't work. If that's the cause, perhaps you could split the window, instead of freezing the panes. Barbara wrote: > I have an Excel workbook that has data validation lists. > The sources for the lists are ranges. On one worksheet, > the drop...