ChauhanSaab
New Member
- Joined
- May 5, 2020
- Messages
- 3
- Office Version
- 365
- 2016
- Platform
- Windows
Hi,
For the below goal seek macro, the counter cell AF1 changes on every iteration.
Can i add some code to change the color of the cell randomly on every counter increment till the loop completes.
Sub Goal_Seek_Range()
Dim j As Integer
Dim count As Long
count = 0
For j = 5 To 2482
Cells(j, "AH").GoalSeek Goal:=135, ChangingCell:=Cells(j, "AG")
count = count + 1
Range("AF1").Value = count
DoEvents
Next j
ActiveWorkbook.Save
End Sub
For the below goal seek macro, the counter cell AF1 changes on every iteration.
Can i add some code to change the color of the cell randomly on every counter increment till the loop completes.
Sub Goal_Seek_Range()
Dim j As Integer
Dim count As Long
count = 0
For j = 5 To 2482
Cells(j, "AH").GoalSeek Goal:=135, ChangingCell:=Cells(j, "AG")
count = count + 1
Range("AF1").Value = count
DoEvents
Next j
ActiveWorkbook.Save
End Sub