Thread: DATA VALIDATION
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bdm bdm is offline
external usenet poster
 
Posts: 2
Default DATA VALIDATION

DATA VALIDATION:

col heading = RENHB
valid value = "R,E,N,H,B"

Data/Validation/Custom/Formula = ( function dvRENHB )
(that's what I want, anyway)

(simple version)
Function dvRENHB()
dvRENHB = 0
Dim cVAL
cVAL = ActiveCell.Value
cVAL = UCase(cVAL)
If InStr(1, "RENHB", cVAL, 1) Then
ActiveCell.Value = cVAL
dvRENHB = 1
End If
End Function

Cannot use custom funtion for data validation, so...

I set Data/Validation/Custom/Formula = "=A1" (and "=$A$1")
I set A1 = "=dvRENHB()"; doesn't work
I set A1 = "dvRENHB()"; doesn't work
I set A1 = (...many more...)

How can I get this to work?

Thanks