Hi All
I have a simple code blow that i have in my excel. As the Value of F4 changes from time to time, the values to be populated in the Range changes. But i find that if once a value has been populated, the new option cannot overwrite the cell. Ie, if Plan A was chosen, and Cell G5 is already 100000, when plan B is subsequently selected, it would not change to 80000 but stay as 100000.
How can i fix this?
If Sheets("Main").Range("F4").Value = "Plan A" Then
Sheets("GMM").Range("G5").Value = 100000
Sheets("GMM").Range("G8").Value = 10000
ElseIf Sheets("Main").Range("F4").Value = "Plan B" Then
Sheets("GMM").Range("G5").Value = 80000
Sheets("GMM").Range("G8").Value = 8000
End If
I have a simple code blow that i have in my excel. As the Value of F4 changes from time to time, the values to be populated in the Range changes. But i find that if once a value has been populated, the new option cannot overwrite the cell. Ie, if Plan A was chosen, and Cell G5 is already 100000, when plan B is subsequently selected, it would not change to 80000 but stay as 100000.
How can i fix this?
If Sheets("Main").Range("F4").Value = "Plan A" Then
Sheets("GMM").Range("G5").Value = 100000
Sheets("GMM").Range("G8").Value = 10000
ElseIf Sheets("Main").Range("F4").Value = "Plan B" Then
Sheets("GMM").Range("G5").Value = 80000
Sheets("GMM").Range("G8").Value = 8000
End If