PC Review


Reply
Thread Tools Rate Thread

changing validation drop down based on another cell value

 
 
pawlingJohn
Guest
Posts: n/a
 
      16th Jan 2009
I need to change the drop-down list in a validation based on what is entered
in another cell. The other cell will be a vendor name and the list should be
product codes for that vendor.

thanks
 
Reply With Quote
 
 
 
 
john
Guest
Posts: n/a
 
      16th Jan 2009
have a look at this site.
http://www.contextures.com/xlDataVal02.html
--
jb


"pawlingJohn" wrote:

> I need to change the drop-down list in a validation based on what is entered
> in another cell. The other cell will be a vendor name and the list should be
> product codes for that vendor.
>
> thanks

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      16th Jan 2009
If you want to change the LIST in data validation in cell a3 based on what
changes in cell a2, use this with NAMED ranges for your lists. Right click
sheet tab>insert this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
With Range("a3").Validation
'delete those not needed
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=" & Range("a2") '"list1"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"pawlingJohn" <(E-Mail Removed)> wrote in message
news:62E438F7-04D6-4313-847A-(E-Mail Removed)...
>I need to change the drop-down list in a validation based on what is
>entered
> in another cell. The other cell will be a vendor name and the list should
> be
> product codes for that vendor.
>
> thanks


 
Reply With Quote
 
pawlingJohn
Guest
Posts: n/a
 
      16th Jan 2009
thanks yet again guys i got what i needed

"Don Guillett" wrote:

> If you want to change the LIST in data validation in cell a3 based on what
> changes in cell a2, use this with NAMED ranges for your lists. Right click
> sheet tab>insert this.
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Target.Address = "$A$2" Then
> With Range("a3").Validation
> 'delete those not needed
> .Delete
> .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
> Operator:=xlBetween, Formula1:="=" & Range("a2") '"list1"
> .IgnoreBlank = True
> .InCellDropdown = True
> .InputTitle = ""
> .ErrorTitle = ""
> .InputMessage = ""
> .ErrorMessage = ""
> .ShowInput = True
> .ShowError = True
> End With
> End If
> End Sub
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "pawlingJohn" <(E-Mail Removed)> wrote in message
> news:62E438F7-04D6-4313-847A-(E-Mail Removed)...
> >I need to change the drop-down list in a validation based on what is
> >entered
> > in another cell. The other cell will be a vendor name and the list should
> > be
> > product codes for that vendor.
> >
> > thanks

>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      16th Jan 2009

Which was?
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"pawlingJohn" <(E-Mail Removed)> wrote in message
news:B19A710C-2C42-42CA-BCA8-(E-Mail Removed)...
> thanks yet again guys i got what i needed
>
> "Don Guillett" wrote:
>
>> If you want to change the LIST in data validation in cell a3 based on
>> what
>> changes in cell a2, use this with NAMED ranges for your lists. Right
>> click
>> sheet tab>insert this.
>>
>> Private Sub Worksheet_Change(ByVal Target As Range)
>> If Target.Address = "$A$2" Then
>> With Range("a3").Validation
>> 'delete those not needed
>> .Delete
>> .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
>> Operator:=xlBetween, Formula1:="=" & Range("a2") '"list1"
>> .IgnoreBlank = True
>> .InCellDropdown = True
>> .InputTitle = ""
>> .ErrorTitle = ""
>> .InputMessage = ""
>> .ErrorMessage = ""
>> .ShowInput = True
>> .ShowError = True
>> End With
>> End If
>> End Sub
>>
>> --
>> Don Guillett
>> Microsoft MVP Excel
>> SalesAid Software
>> (E-Mail Removed)
>> "pawlingJohn" <(E-Mail Removed)> wrote in message
>> news:62E438F7-04D6-4313-847A-(E-Mail Removed)...
>> >I need to change the drop-down list in a validation based on what is
>> >entered
>> > in another cell. The other cell will be a vendor name and the list
>> > should
>> > be
>> > product codes for that vendor.
>> >
>> > thanks

>>
>>


 
Reply With Quote
 
pawlingJohn
Guest
Posts: n/a
 
      16th Jan 2009
a P.O. form that changes product dropdown menus depending on who your
ordering from.

This Discussion Group is great

"Don Guillett" wrote:

>
> Which was?
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "pawlingJohn" <(E-Mail Removed)> wrote in message
> news:B19A710C-2C42-42CA-BCA8-(E-Mail Removed)...
> > thanks yet again guys i got what i needed
> >
> > "Don Guillett" wrote:
> >
> >> If you want to change the LIST in data validation in cell a3 based on
> >> what
> >> changes in cell a2, use this with NAMED ranges for your lists. Right
> >> click
> >> sheet tab>insert this.
> >>
> >> Private Sub Worksheet_Change(ByVal Target As Range)
> >> If Target.Address = "$A$2" Then
> >> With Range("a3").Validation
> >> 'delete those not needed
> >> .Delete
> >> .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
> >> Operator:=xlBetween, Formula1:="=" & Range("a2") '"list1"
> >> .IgnoreBlank = True
> >> .InCellDropdown = True
> >> .InputTitle = ""
> >> .ErrorTitle = ""
> >> .InputMessage = ""
> >> .ErrorMessage = ""
> >> .ShowInput = True
> >> .ShowError = True
> >> End With
> >> End If
> >> End Sub
> >>
> >> --
> >> Don Guillett
> >> Microsoft MVP Excel
> >> SalesAid Software
> >> (E-Mail Removed)
> >> "pawlingJohn" <(E-Mail Removed)> wrote in message
> >> news:62E438F7-04D6-4313-847A-(E-Mail Removed)...
> >> >I need to change the drop-down list in a validation based on what is
> >> >entered
> >> > in another cell. The other cell will be a vendor name and the list
> >> > should
> >> > be
> >> > product codes for that vendor.
> >> >
> >> > thanks
> >>
> >>

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning on data validation in one cell based on the contents ofanother cell chris.thompson13@ntlworld.com Microsoft Excel Discussion 1 17th Mar 2011 12:19 PM
Changing Multiple Cell Colours based on Drop Down option Selected =?Utf-8?B?R3J1bXB5IEhlYWQ=?= Microsoft Excel Programming 2 15th Sep 2006 01:26 AM
data validation to restrict input in cell based on value of cell above that cell NC Microsoft Excel Programming 2 25th Jan 2005 07:11 AM
Auto-Populate based on Drop-Down Lists (Validation) =?Utf-8?B?S2V2aW4gUyAtIDM0MjEw?= Microsoft Excel Misc 0 21st Oct 2004 03:53 PM
Dynamically adding an in-cell drop-down list (i.e. Validation Object) to a cell? debartsa Microsoft Excel Programming 5 5th Mar 2004 08:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:54 AM.