#1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default adding ranges

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
  #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


  #3   Report Post  
Posted to microsoft.public.excel.misc
B. R.Ramachandran
 
Posts: n/a
Default adding ranges

Hi,

Even though the following approach doesn't 'create a button' to do what you
want, it nevertheless achieves your objective.

Select and copy Column C -- Select Column A (note that the selections
should be of the same size) -- "Edit" -- "Paste Special" and check "Add"
(under "Operation") -- "OK"

Please note that the original contents of Column A are overwritten by the
new values; so you won't have a record of the old data (of course, you can
get them back by doing the reverse)

Regards,
B. R. Ramachandran

" 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding named ranges Mike EHB-Docks New Users to Excel 7 April 8th 05 01:53 PM
CF+ in X2000 and lost copy/past ability also ? about adding ranges lyoung2 Excel Worksheet Functions 0 March 23rd 05 01:13 AM
Problem with graph ranges No Such Luck Charts and Charting in Excel 6 December 3rd 04 01:09 PM
compare unique identifiers in multiple ranges bawilli_91125 Charts and Charting in Excel 1 November 30th 04 06:34 PM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"