View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jason Hancock Jason Hancock is offline
external usenet poster
 
Posts: 13
Default looping every third row

I am trying to write a loop that will iterate every third row from row 4
to row 238. Each iteration would be as follows.

Range("C4").Select
ActiveCell.FormulaR1C1 = "=R[-1]C[0]-R[-2]C[0]"
Selection.NumberFormat = "$#,##0_);[Red]($#,##0)"
Range("C4:C4").AutoFill Destination:=Range("D4:O4")

I know I could write this in C++ with a for loop, but I'm not sure how I
would write this in VB. Any help would be great!

Jason


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!