View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default HOW DO I ADD ONE COLUMN TO A SECOND WITHOUT DELETING THAT VALUE

i have no idea what you're trying to do, but here's a guess.

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Set ws = Worksheets("Sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
Dim i As Long

For i = 1 To lastrow
With ws
.Range("B" & i).Formula = "=" & .Range("B" & i).Value & "+ A" & i
End With
Next
End Sub


--


Gary

"Nick" wrote in message
...
How do I add one column to a second without deleting the original value in
the second column. i am trying to get an accumulative value. The value in
the first column will change constantly.

Thanks,

Nick