Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using code to automate "h:mm" | Excel Discussion (Misc queries) | |||
use VB code IF to automate filling in 11 columns | Excel Discussion (Misc queries) | |||
Automate without add-ins | Excel Discussion (Misc queries) | |||
Automate PDF file creation in Excel code | Excel Programming | |||
VBA Code to automate "Save As" | Excel Programming |