PC Review


Reply
Thread Tools Rate Thread

how blank data validation cell after changing dependent cell?

 
 
Ian Elliott
Guest
Posts: n/a
 
      14th Aug 2009
Thanks for any help.
Using http://contextures.com/xlDataVal02.html, I have a data validation
dependent on another data validation. So when I change the original data
validation, and then change the dependent data validation, I only get a
choice based upon the original data validation. However, before I choose for
the dependent data validation, if I had a previous choice that wasn't
possible, that value will still remain, even if I choose the original data
validation something that won't have that dependent value. Is there a way to
blank out the dependent if it won't be allowed?
Sorry if that's confusing.
 
Reply With Quote
 
 
 
 
Ian Elliott
Guest
Posts: n/a
 
      14th Aug 2009
Actually, if I may add to this, how about not 'blanking' it, but setting it
to a default value?
Thanks for any help.

"Ian Elliott" wrote:

> Thanks for any help.
> Using http://contextures.com/xlDataVal02.html, I have a data validation
> dependent on another data validation. So when I change the original data
> validation, and then change the dependent data validation, I only get a
> choice based upon the original data validation. However, before I choose for
> the dependent data validation, if I had a previous choice that wasn't
> possible, that value will still remain, even if I choose the original data
> validation something that won't have that dependent value. Is there a way to
> blank out the dependent if it won't be allowed?
> Sorry if that's confusing.

 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      14th Aug 2009
Do you have just 1 primary drop down and 1 dependent drop down? If so, what
cells are they in?

--
Biff
Microsoft Excel MVP


"Ian Elliott" <(E-Mail Removed)> wrote in message
news:48DF0AE6-B768-4A8B-BCD7-(E-Mail Removed)...
> Thanks for any help.
> Using http://contextures.com/xlDataVal02.html, I have a data validation
> dependent on another data validation. So when I change the original data
> validation, and then change the dependent data validation, I only get a
> choice based upon the original data validation. However, before I choose
> for
> the dependent data validation, if I had a previous choice that wasn't
> possible, that value will still remain, even if I choose the original data
> validation something that won't have that dependent value. Is there a way
> to
> blank out the dependent if it won't be allowed?
> Sorry if that's confusing.



 
Reply With Quote
 
Ian Elliott
Guest
Posts: n/a
 
      14th Aug 2009
Thanks for offering to help, Valko.
No, I have 2 primary & 1 dependent (or maybe the right way to look at it is
1 primary & 2 dependent). The 1st primary is B1, the 1st dependent is B2, and
the 2nd dependent is B3.



"T. Valko" wrote:

> Do you have just 1 primary drop down and 1 dependent drop down? If so, what
> cells are they in?
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "Ian Elliott" <(E-Mail Removed)> wrote in message
> news:48DF0AE6-B768-4A8B-BCD7-(E-Mail Removed)...
> > Thanks for any help.
> > Using http://contextures.com/xlDataVal02.html, I have a data validation
> > dependent on another data validation. So when I change the original data
> > validation, and then change the dependent data validation, I only get a
> > choice based upon the original data validation. However, before I choose
> > for
> > the dependent data validation, if I had a previous choice that wasn't
> > possible, that value will still remain, even if I choose the original data
> > validation something that won't have that dependent value. Is there a way
> > to
> > blank out the dependent if it won't be allowed?
> > Sorry if that's confusing.

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      14th Aug 2009
Ok, what you want to do is to clear the contents of the dependent cells
whenever a new selection is made from the parent drop down list.

This requires an event macro.

Select the sheet with your drop downs
Right clcik the sheet tab and select View code
Copy paste the code below into the window that opens

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo sub_exit
If Target.Address = "$B$1" Then
Range("B2:B3").ClearContents
ElseIf Target.Address = "$B$2" Then
Range("B3").ClearContents
End If
sub_exit:
Application.EnableEvents = True
End Sub

Close the window and return to Excel

--
Biff
Microsoft Excel MVP


"Ian Elliott" <(E-Mail Removed)> wrote in message
news:2992A7C6-93B9-4A2A-9211-(E-Mail Removed)...
> Thanks for offering to help, Valko.
> No, I have 2 primary & 1 dependent (or maybe the right way to look at it
> is
> 1 primary & 2 dependent). The 1st primary is B1, the 1st dependent is B2,
> and
> the 2nd dependent is B3.
>
>
>
> "T. Valko" wrote:
>
>> Do you have just 1 primary drop down and 1 dependent drop down? If so,
>> what
>> cells are they in?
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "Ian Elliott" <(E-Mail Removed)> wrote in message
>> news:48DF0AE6-B768-4A8B-BCD7-(E-Mail Removed)...
>> > Thanks for any help.
>> > Using http://contextures.com/xlDataVal02.html, I have a data validation
>> > dependent on another data validation. So when I change the original
>> > data
>> > validation, and then change the dependent data validation, I only get a
>> > choice based upon the original data validation. However, before I
>> > choose
>> > for
>> > the dependent data validation, if I had a previous choice that wasn't
>> > possible, that value will still remain, even if I choose the original
>> > data
>> > validation something that won't have that dependent value. Is there a
>> > way
>> > to
>> > blank out the dependent if it won't be allowed?
>> > Sorry if that's confusing.

>>
>>
>>



 
Reply With Quote
 
Debra Dalgleish
Guest
Posts: n/a
 
      16th Aug 2009
Another option is to make the first drop down list dependent on the
second list too. There's an example here:

Prevent Cheating With an Excel Drop Down List
http://blog.contextures.com/archives/2009/07/27/



Ian Elliott wrote:
> Thanks for offering to help, Valko.
> No, I have 2 primary & 1 dependent (or maybe the right way to look at it is
> 1 primary & 2 dependent). The 1st primary is B1, the 1st dependent is B2, and
> the 2nd dependent is B3.
>
>
>
> "T. Valko" wrote:
>
>
>>Do you have just 1 primary drop down and 1 dependent drop down? If so, what
>>cells are they in?
>>
>>--
>>Biff
>>Microsoft Excel MVP
>>
>>
>>"Ian Elliott" <(E-Mail Removed)> wrote in message
>>news:48DF0AE6-B768-4A8B-BCD7-(E-Mail Removed)...
>>
>>>Thanks for any help.
>>>Using http://contextures.com/xlDataVal02.html, I have a data validation
>>>dependent on another data validation. So when I change the original data
>>>validation, and then change the dependent data validation, I only get a
>>>choice based upon the original data validation. However, before I choose
>>>for
>>>the dependent data validation, if I had a previous choice that wasn't
>>>possible, that value will still remain, even if I choose the original data
>>>validation something that won't have that dependent value. Is there a way
>>>to
>>>blank out the dependent if it won't be allowed?
>>>Sorry if that's confusing.

>>
>>
>>



--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com

 
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
In-cell dropdown dependent on cell value (Data Validation) RandomStu Microsoft Excel Discussion 1 19th Oct 2009 07:44 PM
Cell Changes with Dependent Validation bruleto Microsoft Excel Discussion 3 26th Mar 2009 03:43 PM
Data Validation list dependent on contents of another cell Scorer150 Microsoft Excel Misc 2 7th Feb 2008 01:13 AM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... amorrison2006@googlemail.com Microsoft Excel Programming 2 7th Jun 2007 09:27 PM
Data validation dependent on value in another cell. =?Utf-8?B?R3ViYXdhdHRz?= Microsoft Excel Programming 2 2nd Apr 2007 10:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:32 AM.