LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default How do I reference cells in CF formula within loop

Rick,

Thank you, I think that is the new process I needed to learn.

Assuming you want relative referencing, try it this way...

For Each C In Range("A1:C3")
C.FormatConditions.Delete
C.Select
C.FormatConditions.Add Type:=xlExpression, _
Formula1:="=" & C.Address(0, 0) & "<" & C.Offset(10).Address(0, 0)
C.FormatConditions(1).Interior.ColorIndex = 36
Next


John Keith

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to reference two cells to construct formula DaisyGirl Excel Programming 1 June 14th 09 06:14 PM
Loop for formula on one sheet with reference from another sheet Valerie Excel Programming 1 August 28th 08 05:22 PM
Putting formula in cells from a loop Andreww Excel Programming 1 February 13th 07 11:55 AM
For Each ... Next loop - need to reference the loop variable [email protected] Excel Programming 4 July 13th 06 06:12 PM
My formula screws up other reference cells... Jambruins Excel Discussion (Misc queries) 2 February 28th 05 02:57 PM


All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"