Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Eliminating choices on data validation

I am not sure how to do this, but I hope it can be easily accomplished.

I would like to have Cell A1 to have a drop down box to choose data 1,2,3,4

Now, I would like the same for Cell A2 except eliminate the choice that was
chosen in cell A1.

So, if I choose 3 for cell A1 then my choices would only be 1,2,4 for cell
A2. Is this possible and how do I do it?

TIA, Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default Eliminating choices on data validation

Hi
Add the following code in the Worksheet_Change event

Private Sub Worksheet_Change(ByVal Target As Range)
Dim sList$, i%
If Target.Cells(1, 1).Address = "$A$1" Then
For i = 1 To 4
If i < Sheet1.Cells(1, 1).Value Then
If sList < "" Then sList = sList & ","
sList = sList & i
End If
Next i
With Sheet1.Range("A2").Validation
.Delete
.Add xlValidateList, , , Formula1:=sList
End With
End If
End Sub


"Tim K" wrote:

I am not sure how to do this, but I hope it can be easily accomplished.

I would like to have Cell A1 to have a drop down box to choose data 1,2,3,4

Now, I would like the same for Cell A2 except eliminate the choice that was
chosen in cell A1.

So, if I choose 3 for cell A1 then my choices would only be 1,2,4 for cell
A2. Is this possible and how do I do it?

TIA, Tim

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
Validation - Narrowing down choices Jamie Excel Discussion (Misc queries) 4 April 9th 07 07:08 AM
How to use condiational validation choices in same column? Lost in Excel Excel Worksheet Functions 4 June 26th 06 07:28 PM
validation - anyway to select multiple choices in the pull down? TracyChoi Excel Worksheet Functions 2 June 3rd 06 01:51 AM
Choices from Data Validation List FeFi Excel Discussion (Misc queries) 2 January 30th 06 12:58 AM
Length of a Validation Items drop down choices Darin Kramer[_3_] Excel Programming 1 February 18th 05 11:35 AM


All times are GMT +1. The time now is 04:19 PM.

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

About Us

"It's about Microsoft Excel"