LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default using the address properties from range objects in a sum formula

I am trying to create a sum formula that uses two range objects as the input
to the sum formula. For example I have the following ranges dimensioned:

Dim r1 As Range, r2 As Range

Further down in the code have the following lines:

Range("c22").select
Set r1 = Range(ActiveCell.Address)
Range("C40").Select
Set r2 = Range(ActiveCell.Address)

Now I want to do a sum formula using these two ranges. I then go to a blank
cell in code and try to enter this:

= sum(r1.Address:r2.Address)

When i try this it doesn't compile and throws an error that says expected
list seperator or ).

Can someone point me to some documentation or otherwise advise me on how I
should be approaching this problem?

Thank you very much!
JEFF



 
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
Beginer to UserForms question on assigning properties to objects [email protected] Excel Discussion (Misc queries) 3 July 27th 07 01:45 PM
Deleting Range name's listed in the range address box. Satnam Patel Excel Discussion (Misc queries) 4 May 5th 05 01:42 PM
Data range properties baz Excel Discussion (Misc queries) 1 April 1st 05 09:37 AM
data range properties baz Excel Discussion (Misc queries) 0 April 1st 05 08:53 AM
Formula to return ADDRESS of cell in range that meets criteria Christie Excel Worksheet Functions 1 March 4th 05 11:13 PM


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

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

About Us

"It's about Microsoft Excel"