So what i'm looking for is that I have two lists via Data Validation, and when someone changes their selection in list A, i'd like for list B to auto-delete whatever value it had in it.
Also, on a different topic, i'd like to know how to hide certain sheets in a workbook from public view.
Last edited by orcheon; 04-26-2009 at 03:03 PM.
You most likely need a worksheet_change macro watching the primary cell(s) and deleting the selections in the secondary cell(s) when a change is made.
Right-click on the sheet tab and select VIEW CODE...paste in the code above and adjust the cell references.Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("H1")) Is Nothing Then Range("I1:J1").ClearContents End If End Sub
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
That works great, thanks!
If i'm saving my workbook and putting it on googledocs or a different site, how can I hide worksheets from public view while still using them in the sheet I want to display?
Is there a way to do this without macros? Can't upload it to googledocs if I have to save it in .xlsm format =/
Last edited by orcheon; 04-25-2009 at 03:46 PM.
Not the best place for GoogleDocs questions...but maybe you'll get lucky. Someone around here may use it.
Meanwhile, if that takes care of your Excel need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
sir
for me above given code works with only given cell reference please let me know what was the code for whole coulmn
I try following code
but it delite all coulmn data in coumn I & J when i delet or Put any cell value in column HPrivate Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("H1:H10")) Is Nothing Then Range("I8:J10").ClearContents End If End Sub
Give an example of a change in cell H1 should cause which cells to clear? A change in H2 should cause which cells to clear?
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
i create the Bill of material sheet using multiple column dependent data validation (drop down list)
refer the attachment
My selection is
when i select cell Value in Column B drop down list then cell Value in Column C drop down list show only range/List related with column B cell value.
My problem is
When I change or delete the Column B cell value then Column C value is as per last selection value until i Chang or delete it
I want solution for
when i change or delete the column B cell value then Column C cell value must be blank until i select it from drop down list.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks