sisi1887
sisi1887

Reputation: 95

Write into an excel cell that already has a value and not write over previous val

Is it possible to write into an excel cell that already has value, and not delete what's already there? So just add to what's already in there.

So for example, I have a for each loop that gets a diff value and I want it all to go into one cell. Is that possible?

Upvotes: 0

Views: 267

Answers (1)

Gary's Student
Gary's Student

Reputation: 96763

Sure.............place a value in cell A1 and:

Sub Addup()
    For i = 1 To 10
    With Range("A1")
        .Value = .Value + i
    End With
    Next i
End Sub

Upvotes: 3

Related Questions