View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ghawk ghawk is offline
external usenet poster
 
Posts: 1
Default Using If and Validation to turn a cell on one way or another

I have created a simple example file of what I am trying to accomplish see
the attached file, or please email me at and I
will send the file.

"Vasant Nanavati" wrote:

You would have to set up a Worksheet_Change macro so that when the adjacent
cell is changed, validation is set up. Hard to explain further without
details.

Example:

If Range("B1") = 0 Then
Range("A1").Validation.Delete
Else
Range("A1").Validation.Add Type:=xlValidateList, Formula1:="1,2,3"
End If

--

Vasant








"ghawk" wrote in message
...
I have a Cell that I would like to setup to us an IF statement or a
variable.
I am trying to set this cell up that IF True it will work from a List Box,
but if False it will allow me to type in General Text or numbers. I can
set
it up for one or the other currently, but need it to do both depending on
what is in the cell next to it.