Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Sum a dynamically-defined range

I have a series of cells containing the defining limits of a range, i.e.:
-sheet name
-top row number
-top column number
-bottom row number
-bottom column number

How do I sum (or otherwise operate on) the array so defined? I have tried
formulae containing combinations of various ADDRESS and INDIRECT functions,
but have not yet come across one that works.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Sum a dynamically-defined range

Try the below with

A1-sheet name
A2-top row number
A3-top column number
A4-bottom row number
A5-bottom column number


=SUM(OFFSET(INDIRECT("'" & A1 & "'!A1"),A2-1,A3-1,A4-A2+1,A5-A3+1))

--
Jacob


"Hershmab" wrote:

I have a series of cells containing the defining limits of a range, i.e.:
-sheet name
-top row number
-top column number
-bottom row number
-bottom column number

How do I sum (or otherwise operate on) the array so defined? I have tried
formulae containing combinations of various ADDRESS and INDIRECT functions,
but have not yet come across one that works.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Sum a dynamically-defined range

Using these references:
A1 -sheet name
a2 -top row number
a3 -top column number
a4 -bottom row number
a5 -bottom column number

This formula will genearte a summation of the dynamic range:
=SUM(OFFSET(INDIRECT("'"&A1&"'!"&ADDRESS(A2,A3)),, ,A4-A2+1,A5-A3+1))

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Hershmab" wrote:

I have a series of cells containing the defining limits of a range, i.e.:
-sheet name
-top row number
-top column number
-bottom row number
-bottom column number

How do I sum (or otherwise operate on) the array so defined? I have tried
formulae containing combinations of various ADDRESS and INDIRECT functions,
but have not yet come across one that works.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Sum a dynamically-defined range

=SuM(INDIRECT(A1&"!R"&A2&"C"&A3&":R"&A4&"C"&A5,FAL SE))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Hershmab" wrote in message
...
I have a series of cells containing the defining limits of a range, i.e.:
-sheet name
-top row number
-top column number
-bottom row number
-bottom column number

How do I sum (or otherwise operate on) the array so defined? I have tried
formulae containing combinations of various ADDRESS and INDIRECT
functions,
but have not yet come across one that works.


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
ComboxBox with Dynamically Defined Source, and LinkedCell error GlennUK Excel Discussion (Misc queries) 1 June 4th 08 03:11 PM
How can dynamically set a range name in a HLOOKUP command? Ron Excel Worksheet Functions 1 November 7th 07 10:50 PM
Setting Range Dynamically DJS Excel Discussion (Misc queries) 5 December 7th 06 09:51 PM
Dynamically Generated Range using Macro [email protected] Excel Worksheet Functions 2 July 15th 06 08:12 AM
Dynamically set a range? BKGT Excel Worksheet Functions 3 April 27th 06 03:26 PM


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