Good afternoon,
I have a simple formula to run on a number of cells. The formula references the cells next to it and, according to their values, adjusts the value of each cell in turn. What I'm having trouble with is working out a For Next loop that identifies each cell in turn in order for the formula to erun correctly. At the moment I only have a 3X3 matrix but it is possible that this may be increased to the 100's.
I could enter the formula 9 times but this would soon become impractical.
If it helps here is the formula I'm running on each cell(the example is for cell A1):
If Cells(1, 2) > 6 And Cells(2, 1) > 6 Then
A1.Value = A1 + 1
Else
If Cells(1, 2) < 4 And Cells(2, 1) < 4 Then
A1.Value = A1 - 1
End If
End If
I will be making the formula more complex in the future but I need to get the basic setup right first.
Thanks in advance,
aexley
I have a simple formula to run on a number of cells. The formula references the cells next to it and, according to their values, adjusts the value of each cell in turn. What I'm having trouble with is working out a For Next loop that identifies each cell in turn in order for the formula to erun correctly. At the moment I only have a 3X3 matrix but it is possible that this may be increased to the 100's.
I could enter the formula 9 times but this would soon become impractical.
If it helps here is the formula I'm running on each cell(the example is for cell A1):
If Cells(1, 2) > 6 And Cells(2, 1) > 6 Then
A1.Value = A1 + 1
Else
If Cells(1, 2) < 4 And Cells(2, 1) < 4 Then
A1.Value = A1 - 1
End If
End If
I will be making the formula more complex in the future but I need to get the basic setup right first.
Thanks in advance,
aexley