![]() |
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
![]()
I kind of kludged it using a few "mirror" cells. Again it is using the condition level of 0.5 to make testing easier.
Cells A1 and A2 are as you have them. Cell C1 stores the value of A1 as it is calculated when the button is pressed. This needs to be done because when the code writes the counter, it will recalculate the Rand() again and you won't see what the value was. Cell C2 is the counter. If you use A2 as the counter, the code overwrites the equation. Thus the code is: Sub Button1_Click() Dim x As Double Calculate x = Cells(2, 1) Cells(1, 3) = Cells(1, 1) Cells(2, 3) = Cells(2, 3) + x End Sub There are probably better ways. See attached. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
shabbaranks | Excel | 17 | 05-13-2014 06:47 PM |
![]() |
lucnijs | Excel | 6 | 03-26-2012 09:29 AM |
How to count year lapse (rounded off) based on specific date | KIM SOLIS | Excel | 1 | 11-01-2011 10:50 AM |
![]() |
iuliandonici | Excel | 1 | 04-13-2011 09:45 PM |
changing word count | hamster | Word | 3 | 06-03-2010 01:53 AM |