Thread: question to Ron
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ALEX ALEX is offline
external usenet poster
 
Posts: 493
Default question to Ron

Thanks, I've managed with it.
With Target(1, 12)
If Target.Value < "" Then
varTV = Target.Value
If varTV = "ERP" Or varTV = "PM" Or varTV = "HPW" Or varTV = "OJT" _
Or varTV = "SBR" Or varTV = "LD" Or varTV = "CFT" Then
.FormulaR1C1 = "=True"
Else
.FormulaR1C1 = "=False"
End If

Else
.ClearContents
End If
End With

"Alex" wrote:

Ron,
How could I assign your wonderful formula you advised before
[=OR(A2={"ERP","PM","HPW","OJT","SBR"","LD","CFT"})] to the FormulaR1C1?
I'm trying different ways but nothing is working.
'A = Array("ERP", "PM", "HPW", "OJT", "SBR", "LD", "CFT")
strERP = "ERP"
strPM = "PM"
strHPW = "HPW"
strOJT = "OJT"
strSBR = "SBR"
strLD = "LD"
strCFT = "CFT"
.FormulaR1C1 =
"=OR(RC[-11]={strERP,strPM,strHPW,strOJT,strSBR,strLD,strCFT}) " '
"=OR(RC[-11]=A)"

Thanks