R
RELWOD85
im having a bit of trouble with this coding i want to add a value of one
to a cell to keep a running total no matter what number is put into that
cell theres more info down below please could anyone help me?
Private Sub Submit_Click()
Dim x As Integer
Dim one As Integer
Dim two As Integer
Dim three As Integer
Dim four As Integer
Dim five As Integer
one = 1
two = 1
three = 1
four = 1
five = 1
x = Range("a1").Value
Range("a1").Value = Range("a2").Value
Range("a2").Value = x + ActiveCell.FormulaR1C1 = "sum(+1)"
'here instead of swopping the values each time a number one to five is
'entered i want 1 to be added so that cell a2 keeps a running total so
'if 9 was entered into cell a1 then 1 would be added to cell a2 then
if
'7 was entered into cell a1 then 1 would be addedd to the one already
in
'cell a2 making the total in that cell 2
End Sub
to a cell to keep a running total no matter what number is put into that
cell theres more info down below please could anyone help me?
Private Sub Submit_Click()
Dim x As Integer
Dim one As Integer
Dim two As Integer
Dim three As Integer
Dim four As Integer
Dim five As Integer
one = 1
two = 1
three = 1
four = 1
five = 1
x = Range("a1").Value
Range("a1").Value = Range("a2").Value
Range("a2").Value = x + ActiveCell.FormulaR1C1 = "sum(+1)"
'here instead of swopping the values each time a number one to five is
'entered i want 1 to be added so that cell a2 keeps a running total so
'if 9 was entered into cell a1 then 1 would be added to cell a2 then
if
'7 was entered into cell a1 then 1 would be addedd to the one already
in
'cell a2 making the total in that cell 2
End Sub