PC Review


Reply
Thread Tools Rate Thread

Block addition of ranges

 
 
chrisquayle@gmail.com
Guest
Posts: n/a
 
      23rd May 2007
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 With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      23rd May 2007
for i = 1 to rng1.count

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

--
Regards,
Tom Ogilvy


"(E-Mail Removed)" 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 With Quote
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      23rd May 2007
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


"(E-Mail Removed)" 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Block addition of ranges Susan Microsoft Excel Programming 2 25th May 2007 12:47 PM
Re: Block addition of ranges Susan Microsoft Excel Programming 1 24th May 2007 02:03 AM
Re: Block addition of ranges chrisquayle@gmail.com Microsoft Excel Programming 1 24th May 2007 01:56 AM
Re: Block addition of ranges Susan Microsoft Excel Programming 1 23rd May 2007 04:33 PM
strange block action against attempted trusted site addition John Spyware Discussion 2 1st Apr 2005 05:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:08 AM.