Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Block addition of ranges

I am trying to achieve the following with a vba macro:

Add the values of Rng1 on top of the existing values in Rng2. Rng1 &
Rng2 are the same dimensions. It can be done by copying Rng1 and doing
a PasteSpecial values add command to Rng2. However, it is a
requirement that this macro does not use the clip board.

Would really appreciate any ideas.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Block addition of ranges

for i = 1 to rng1.count

rng2(i) = rng2(i) + rng1(i)
Next

--
Regards,
Tom Ogilvy


" wrote:

I am trying to achieve the following with a vba macro:

Add the values of Rng1 on top of the existing values in Rng2. Rng1 &
Rng2 are the same dimensions. It can be done by copying Rng1 and doing
a PasteSpecial values add command to Rng2. However, it is a
requirement that this macro does not use the clip board.

Would really appreciate any ideas.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Block addition of ranges

One idea.

Sub TEST()
Range("D3") = Range("A50").Value
'repeat for each cell involved
'or set up a loop to cover the cells
End Sub
--
Best wishes,

Jim


" wrote:

I am trying to achieve the following with a vba macro:

Add the values of Rng1 on top of the existing values in Rng2. Rng1 &
Rng2 are the same dimensions. It can be done by copying Rng1 and doing
a PasteSpecial values add command to Rng2. However, it is a
requirement that this macro does not use the clip board.

Would really appreciate any ideas.


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
if/then block within another if/then block needs a loop Janis Excel Programming 1 September 8th 06 10:01 PM
Addition? Frodo Excel Discussion (Misc queries) 3 July 22nd 06 01:15 PM
Sum vs. Addition davegb Excel Programming 4 May 19th 06 09:03 PM
addition dali New Users to Excel 1 March 4th 06 06:40 PM
row addition Threshold Excel Worksheet Functions 3 March 17th 05 08:08 PM


All times are GMT +1. The time now is 12:42 PM.

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"