LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Loop in a Range

I am trying to make a loop that calculate each cell to the right of the
"RngMdDp1"-range, based on the value in cell "I3" and "RngMdDp1" . The cells
in "RngMdDp1" gets higher values for each cells, so at one cell there sould
be a breaking point, and the formula would be changed.
can anyone se whats wrong with the macro?
Sub DrillPipe1()
For Each c In Range("RngMdDp1")
If c.Value < ("I3") Then c.Offset(0, 1).FormulaR1C1 =
"=(RC[-1]*RC[-2])" Else c.Offset(0, 1).FormulaR1C1 = "=(RC[-1])"
Next c
End Sub


 
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
Loop through Range and Cut and Paste Kevin L Excel Programming 2 February 16th 05 06:19 PM
Loop through a range Fred[_21_] Excel Programming 6 October 22nd 04 10:45 PM
using For each loop to populate a range Sean Excel Programming 2 September 30th 04 02:13 PM
Changing range name in loop Jeff Excel Programming 4 July 12th 04 08:32 PM
Increasing a range in a loop ric Excel Programming 4 April 26th 04 07:59 PM


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

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

About Us

"It's about Microsoft Excel"