MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Using 2 Data validations together


Posted by steve on February 06, 2001 7:50 PM

I'm trying to use 2 data validations together. The first is used to select the plan I want to select, the second is used to select which page. The problem is when I switch from a page 2 to a different plan and I need too delete the pg2 from the cell whanever the plan is switched. I have setup too always start on the first page because, there's not always going to a pg2.

Thanks steve


Posted by Dave Hawley on February 07, 2001 12:07 AM

Hi Steve

Could you explain that again, I don't understand.

Are you saying you have two cells with a list from the Data Validation box, one with numbers and one with text ?

Dave

OzGrid Business Applications

Posted by steve on February 07, 2001 7:11 AM

I have two cells with data validation dropdown cells. Both cells have text and numbers.( example box one(plan1, plan2, plan3......)box two(pg1, pg2)The containt of box one is a constant, the containt of box2 will either be nothing if it only has one page or it will have pg1, pg2 if it has 2 pages.

The problem is when I switch plans when I'm on a page 2. What I need is to have the contains of the cell where data validation box 2 is at, to be deleted whenever box 1 is changed.

I'm just trying to make the cell of box 2 to always start of blank and not to show the pg2 from the previous plan.

Thanks for the help and thanks again for modifying my VB code the other day.

steve

Posted by Dave Hawley on February 07, 2001 8:16 PM

Hi Steve

Ok, if I understand you correctly then all you should need is some simple code in the Worksheet_Change Event. To get there quickly right click on your sheet nmae tab that has the 2 data validated cells and select "View Code". Then paste this code in and change the ranges to suit.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Address = "$F$3" Then
Range("G3") = ""
End If
End Sub

Hope this helps

Dave


OzGrid Business Applications