View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hotherps[_73_] hotherps[_73_] is offline
external usenet poster
 
Posts: 1
Default Change range multiple times

I'm using the following statement:

For Each Cell In Range("D3:J23")

I want the range in the For Next statement to move 8 colums to th
right and run again. Same row numbers. I need this to happen 20 times.


Then I want to increase each If Range value by 1 each time it loops
Same column numbers. This is also 20 times.To avoid writing out lik
this:

If Range("I29").Value = Range("I26") And Cell.Value "" An
Cells(Cell.Row, "AO") = "x" Then _
Cell.Value = Range("AO1")

If Range("I30").Value = Range("I27") And Cell.Value "" An
Cells(Cell.Row, "AO") = "x" Then _
Cell.Value = Range("AO1")

If Range("H29").Value = Range("H26") And Cell.Value "" An
Cells(Cell.Row, "AN") = "x" Then _
Cell.Value = Range("AN1")

If Range("H30").Value = Range("H27") And Cell.Value "" An
Cells(Cell.Row, "AN") = "x" Then _
Cell.Value = Range("AN1")
etc.

Thanks
Ji

--
Message posted from http://www.ExcelForum.com