Excel - If clause - Changing value of another cell

Copper Contributor

Hello,

I would like to do the following in Excel:

 

In cell B1, I would like to check whether the number in A1 is smaller than C1.

If that is the case, I would like to put a certain number in B1, and simultaneously change the value in C1 (C1+1)

How can I make a formula in B1, so it changes the value of another cell (in this case C1 by C1+1)

 

Would be great if someone has an idea!

Best,

cado

1 Reply

@cado11125 You will need a macro for this

 

Sub Nestedif()

Sheet1.Activate

If Cells(1, 3) >= Cells(1, 1) Then
Cells(1, 2).Value = 55
Cells(1, 3).Value = Cells(1, 3).Value + 1
End If

End Sub

 

If you liked my answer please do mark my answer as Official Answer and Also subscribe my Youtube channel

 

https://www.youtube.com/watch?v=4SlI8HOGvlM&t=3s