LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default sum values in multiple ranges

in the following code, I am not too sure how to add the cell values in the
defined ranges.
I want each cell in range Addt(j) to equal the sum of cell in range Plus(j)
and this for each N value.

Thanks in advance

Dim Addt(1 To 3) As Range
Set Addt(1) = Range(Range("Region1").Offset( 1,
2), Range("Region1").Offset( 1, 9))
Set Addt(2) = Range(Range("Region1").Offset( 4,
2), Range("Region1").Offset( 4, 9))
Set Addt(3) = Range(Range("Region1").Offset( 8,
2), Range("Region1").Offset( 8, 9))


For j = 1 To UBound(Addt)
For N = 48 to 56

Dim Plus(1 To 3) As Range
Set Plus(1) = Range(Range("Country1").Offset(N +
1, 2), Range("Country1").Offset(N + 1, 9))
Set Plus(2) = Range(Range("Country1").Offset(N +
4, 2), Range("Country1").Offset(N + 4, 9))
Set Plus(3) = Range(Range("Country1").Offset(N +
8, 2), Range("Country1").Offset(N + 8, 9))


How can I write this formula?
Addt(j).value =Addt(j).Value+ Plus(j).Value

next
next
--
caroline
 
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
Averaging multiple ranges with #n/a values Anne Excel Discussion (Misc queries) 0 August 13th 08 05:20 PM
sum the values of a range based upon multiple ranges and criteria LiveIt... Excel Worksheet Functions 1 July 17th 06 09:23 PM
How do i update multiple data ranges across multiple worksheets? mwah Excel Discussion (Misc queries) 0 July 6th 06 04:57 AM
Crteating Multiple GIFS from Multiple Ranges -- need someone to test my code to see why it fails Father Guido[_5_] Excel Programming 4 November 22nd 05 05:28 AM
Crteating Multiple GIFS from Multiple Ranges -- need someone to test my code to see why it fails Father Guido[_5_] Excel Programming 0 November 19th 05 08:00 AM


All times are GMT +1. The time now is 07:15 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"