calculate cell before moving to next cell

S

Sliman

I have the following code :-

Check = True: Counter = 0: r = 50 ' Initialize variables.
Do ' Outer loop.
Do While Counter < 1137 ' Inner loop.
r = 50 + Counter 'start row
For C = 15 To 25 'start Column

If Cells(r - 3, 1).Value = "Y" And Cells(r - 3, 2).Value = 3 Then
Cells(r - 1, C).Clear
If Cells(r, C).Value = 0 Then
Cells(r - 1, C).Value = (Cells(r - 2, C).Value - Cells(r, C -
1).Value) _
+ ((Cells(r - 2, C + 1).Value) * (Cells(r - 3, 11).Value) / 4)
ElseIf (Cells(r, C).Value < (Cells(r - 2, C + 1).Value) * (Cells(r
- 3, 11).Value) / 4) Then
Cells(r - 1, C).Value = (Cells(r - 2, C + 1).Value + Cells(r - 2, C
+ 2).Value)
End If
End If
Next C

Counter = Counter + 4 ' Increment Counter.
If Counter > 1137 Then ' If condition is True.
Check = False ' Set value of flag to False.
Exit Do ' Exit inner loop.
End If
Loop
Loop Until Check = False ' Exit outer loop immediately.

But need the formula in Cellc(r,C) to recalculate before moving to next
c.
I have Autocalulate off as takes to long to run with Autocalulate On
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top