• 0

How to add plus one on the total of one cell in excel?


Question

Hello everyone. I want your help. I'm trying to do a formula in excel which takes the value of c1 and updating the value of c1 by adding one. for example if the c1 has value of 5 i want to add plus one on the five so is going to be 6 and update the c1 to value of 6. if i add another one then the value of c1 to be 7. What i have done until now is this formula =IF(A1 = B1, C1+1,C1) but is not updating the c1. can anyone help me? thank you

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Let me make sure am reading this right :)

you want to enter a number in C1 then have it automatically add 1 onto it?

so if you type 4 into C1 one when you press enter you want it to go to 5?

If this is the case you would need to use a macro

lemme have a look see what i can do

  • Like 1
Link to comment
Share on other sites

  • 0

ok


Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
If (Target.Address = Range("C1").Address) Then Range("C1").Value = Range("C1").Value + 1
Application.EnableEvents = True

End Sub[/CODE]

Link to comment
Share on other sites

  • 0

what i want is if A1 = B3 then get the total of C3 and add plus 1. if the C3 has a value 3 then make it 4 or if is 0 make it 1 if only the A1 = B3 which A1 is C and B3 is C

Link to comment
Share on other sites

  • 0

Ok i need more info here lol

so we have is A1 EQUALS B3 then you want to do C3+1 correct?

is C3 populating from somewhere else?

how is the value getting into C3

if you these values

A1: 2

B3: 2

A2: =IF(A1=B1,C1+1,C1)

then cell A2 will be 1 more than cell C3 when A1=B3

if you have a value of say 4 in C1 then you cant put a formula in there as it will overwrite the value

you could do it through use of VBA though

  • Like 1
Link to comment
Share on other sites

This topic is now closed to further replies.