Thread: adding ranges
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default adding ranges

Sub Test()
For Each Cell In Selection
Cell.Value = Cell.Value & Cell.Offset(0, 2).Value
'if need a space between use
'Cell.Value = Cell.Value & " " & Cell.Offset(0, 2).Value
Next
End Sub

Assign this macro to a button.

Select data range in column A and click the button.


Gord Dibben Excel MVP

On Mon, 21 Nov 2005 06:07:07 -0800,
wrote:

how do i make a button that adds
two ranges together
i.e
adds a1 to c1, a2 to c2 etc..
and places these values in the "a" column where the previous values were