View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hotherps[_81_] hotherps[_81_] is offline
external usenet poster
 
Posts: 1
Default Automate this code

I have the following code:
For Each cell In Range("G11:O125")
c = Array(11, 10, 9, 8, 7)
For i = 0 To 4
If Cells(356, c(i)).Value = Cells(305, c(i)) And cell.Value "" An
Cells(cell.Row, c(i) + 97) = "x" Then _
cell.Value = Cells(9, c(i) + 97)
Next i
Next

On the If statement I need to offset one cell down in both ranges abou
50 rows. i.e. 357,358 : 306,307 etc.

As opposed to doing this:

If Cells(356, c(i)).Value = Cells(305, c(i)) And cell.Value
If Cells(357, c(i)).Value = Cells(306, c(i)) And cell.Value
If Cells(358, c(i)).Value = Cells(307, c(i)) And cell.Value
Thank

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