Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.misc
No Name
 
Posts: n/a
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Filling drop down box


Range D2 is the GreeNPackage value. C5:C7 contains values for yes, D5:D7
contains values for no.


Private Sub Worksheet_Change(ByVal Target As Range)

If (Range("D2") = "yes") Then
ComboBox1.ListFillRange = "C5:C7"
ElseIf (Range("D2") = "no") Then
ComboBox1.ListFillRange = "D5:D7"
Else
ComboBox1.ListFillRange = ""
End If


End Sub


- Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=320336

  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Filling drop down box

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


wrote in 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filling colour in drop down options Mary H[_2_] Excel Discussion (Misc queries) 1 October 2nd 08 02:55 PM
filling information from one cell and filling another. Dianne Excel Worksheet Functions 1 August 15th 05 08:14 PM
Zero Filling Excel Discussion (Misc queries) 4 December 17th 04 08:46 PM
Filling drop down box Excel Worksheet Functions 3 November 26th 04 12:54 AM
Filling drop down box Nick Excel Discussion (Misc queries) 0 November 25th 04 07:49 PM


All times are GMT +1. The time now is 03:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"