RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 810
- Office Version
- 365
- Platform
- Windows
Hi all,
Have a value in W1 that started at 0.13 (or 13%)
I'm trying to execute a loop up until the point where the value in W1 exceeds the TGT, which is set as "0.2"
At the bottom of the loop, the value in W1 updates to be higher or lower.
Currently, starting at 0.13 and aiming to be equal or higher than 0.2, my loop is at 0.34 and still going.
Do I need to declare this as a variable, a variant or what?
~~~~~~~~ NEW SUB ~~~~~~~~~~
Thanks!
Have a value in W1 that started at 0.13 (or 13%)
I'm trying to execute a loop up until the point where the value in W1 exceeds the TGT, which is set as "0.2"
At the bottom of the loop, the value in W1 updates to be higher or lower.
Currently, starting at 0.13 and aiming to be equal or higher than 0.2, my loop is at 0.34 and still going.
Do I need to declare this as a variable, a variant or what?
Code:
EUAllocation.EUTarget.Caption = Format(EUValue / 100, "0%")
~~~~~~~~ NEW SUB ~~~~~~~~~~
Code:
Private Sub EUStart_Click()
Set ads = Worksheets("Adselect")
Set atm = Worksheets("ATM")
Application.ScreenUpdating = False
TGT = Format(EUAllocation.EUTarget.Caption, "0.0")
[Lots of irrelevant code]
Do Until Range("W1").Value >= TGT
Range("A3").Activate
Range("W1").FormulaR1C1 = "=COUNTIF(C7,""*EU*"")/COUNTIFS(C6,""Just Go"",C11,""Y"")"
Range("W1").Value = Range("W1").Value
Loop
Thanks!