C
Craig
I use the following macro in Sheet 3:-
Sub counter()
Dim C As Integer
Do Until Range("c8").Value = 7
Calculate
C = C + 1
Cells(8, 4) = C
Loop
End Sub
In Sheet 2 I have a set of =If(Isodd(*data*),1,0) and the result of these
*If* statements changes the *value =7* parameter in the above loop
The *data* are randomly generated variables held in Sheet 1 that need to be
re-calculated by the macro until Value=7( note: I only need to re-calc this
sheet's data - all other sheets' calcs are based on Sheet 1 values)
My problem is that when I run the macro all the =If(isodd(.....)s results in
Sheet 2 change to a VALUE! error - even though the data are and remain
numerical [ according to Excel Help this can only happen if the *data* are
non-numeric]
What am I doing wrong ? Should the re-calc be only applied to Sheet1 and how
do I do that?
Also how do I ensure that only Cells(8,4) of Sheet 3 is written to i.e. if I
launch the macro from another sheet its Cells (8,4) is written to.
Many TIA
Craig
Sub counter()
Dim C As Integer
Do Until Range("c8").Value = 7
Calculate
C = C + 1
Cells(8, 4) = C
Loop
End Sub
In Sheet 2 I have a set of =If(Isodd(*data*),1,0) and the result of these
*If* statements changes the *value =7* parameter in the above loop
The *data* are randomly generated variables held in Sheet 1 that need to be
re-calculated by the macro until Value=7( note: I only need to re-calc this
sheet's data - all other sheets' calcs are based on Sheet 1 values)
My problem is that when I run the macro all the =If(isodd(.....)s results in
Sheet 2 change to a VALUE! error - even though the data are and remain
numerical [ according to Excel Help this can only happen if the *data* are
non-numeric]
What am I doing wrong ? Should the re-calc be only applied to Sheet1 and how
do I do that?
Also how do I ensure that only Cells(8,4) of Sheet 3 is written to i.e. if I
launch the macro from another sheet its Cells (8,4) is written to.
Many TIA
Craig