View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default Problem with relative reference.

"Roontoon" wrote:
The cell in question is three rows down and 16 columns
from the origination point.


"16 columns __from__" does not tell us to the left or right. I will presume
16 to the right, since you are less likely to encounter boundary conditions.

"Roontoon" wrote:
Selection.FormatConditions.Add Type:=xlExpression, _
Formula1:="=$Q$114<0"


I'm not familiar with FormatConditions.Add per se. Based on your syntax,
the following should work for su

Formula1:="=" & Selection.Offset(3,16).Address & "<0"

But the following would be better if it works:

Formula1:="=R[3]C[16]<0"