Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Averaging multiple ranges with #n/a values | Excel Discussion (Misc queries) | |||
sum the values of a range based upon multiple ranges and criteria | Excel Worksheet Functions | |||
How do i update multiple data ranges across multiple worksheets? | Excel Discussion (Misc queries) | |||
Crteating Multiple GIFS from Multiple Ranges -- need someone to test my code to see why it fails | Excel Programming | |||
Crteating Multiple GIFS from Multiple Ranges -- need someone to test my code to see why it fails | Excel Programming |