Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help in syntax
I am trying to write the following formula into cell.
.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=IF(COUNTIF("&rRange & "," & sCell&")1,TRUE,FALSE)" where rRange and sCell are range variables. I got syntax error. Would anyone help? Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help in syntax
Hi
I think this will work. ..FormatConditions.Add Type:=xlExpression, Formula1:= _ "=IF(COUNTIF(rRange , sCell)1,TRUE,FALSE)" Regards Andrew Bourke james wrote: I am trying to write the following formula into cell. .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=IF(COUNTIF("&rRange & "," & sCell&")1,TRUE,FALSE)" where rRange and sCell are range variables. I got syntax error. Would anyone help? Thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help in syntax
You don't give us much help, but assuming that rRange is a range variable
and sCell is a string variable setup earlier in the code, you could try .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=IF(COUNTIF(" & rRange.Address & ",""" & sCell & """)1,TRUE,FALSE)" -- HTH RP (remove nothere from the email address if mailing direct) "james" wrote in message ... I am trying to write the following formula into cell. .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=IF(COUNTIF("&rRange & "," & sCell&")1,TRUE,FALSE)" where rRange and sCell are range variables. I got syntax error. Would anyone help? Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA syntax | Excel Discussion (Misc queries) | |||
IRR Syntax | Excel Worksheet Functions | |||
If then syntax | Excel Worksheet Functions | |||
Need some syntax help, please | Excel Programming | |||
syntax | Excel Programming |