If/Then Statment

Closed
Nancy - 28 Oct 2009 à 17:30
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 28 Oct 2009 à 21:50
Hello,

I want to use an if/then statement that will replace a number in a cell if another cell is 0. For example, if G2 is 0, then take G6 which is currently .63% and add .25% to it and replace the .63 with the answer

1 response

venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 811
28 Oct 2009 à 21:50
If you enter a formula is G6 it will delete the existing value is G6 and you cannot manipulate. Beside it will give circular reference.

but you can have a small macro

Sub test()
If Range("G2") = 0 Then
Range("G6") = Range("G6") + 0.0025
End If

End Sub