Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jeff
 
Posts: n/a
Default Summing a range that changes

Hi,

I have a formula that sums the range

Cell B1 = Sum(A1:$A$100)
and this is copied down to cell B100,
so Cell B33 = Sum(A33:$A$100)

But I want the sum range to change, based on the value in cell C1.

If C1 = 100, then the sum range will = Sum(A1:$A$100),
Cell B33 = Sum(A33:$A$100)

If Cell C1 = 300, then the sum range will = Sum(A1:$A$300)
Cell B33 = Sum(A33:$A$300)

I tried using indirect but I could not figure it out.

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.misc
NUMBnut
 
Posts: n/a
Default Summing a range that changes

Take the $ out of the equations. $ = absolutes, which tells excell that
those particular values do not change.

"Jeff" wrote:

Hi,

I have a formula that sums the range

Cell B1 = Sum(A1:$A$100)
and this is copied down to cell B100,
so Cell B33 = Sum(A33:$A$100)

But I want the sum range to change, based on the value in cell C1.

If C1 = 100, then the sum range will = Sum(A1:$A$100),
Cell B33 = Sum(A33:$A$100)

If Cell C1 = 300, then the sum range will = Sum(A1:$A$300)
Cell B33 = Sum(A33:$A$300)

I tried using indirect but I could not figure it out.

Thanks for your help

  #3   Report Post  
Posted to microsoft.public.excel.misc
Jeff
 
Posts: n/a
Default Summing a range that changes



"NUMBnut" wrote:

Take the $ out of the equations. $ = absolutes, which tells excell that
those particular values do not change.

"Jeff" wrote:

Hi,

I have a formula that sums the range

Cell B1 = Sum(A1:$A$100)
and this is copied down to cell B100,
so Cell B33 = Sum(A33:$A$100)

But I want the sum range to change, based on the value in cell C1.

If C1 = 100, then the sum range will = Sum(A1:$A$100),
Cell B33 = Sum(A33:$A$100)

If Cell C1 = 300, then the sum range will = Sum(A1:$A$300)
Cell B33 = Sum(A33:$A$300)

I tried using indirect but I could not figure it out.

Thanks for your help



That does not work because the last reference A300 must stay constant, and
A1 is the cell that changes
  #4   Report Post  
Posted to microsoft.public.excel.misc
NUMBnut
 
Posts: n/a
Default Summing a range that changes

In using absolutes the entire equation will not change. You can use the fill
feature to fill down, but you will have to go back and change the values.
Sorry, don't know a short cut for that.

"Jeff" wrote:



"NUMBnut" wrote:

Take the $ out of the equations. $ = absolutes, which tells excell that
those particular values do not change.

"Jeff" wrote:

Hi,

I have a formula that sums the range

Cell B1 = Sum(A1:$A$100)
and this is copied down to cell B100,
so Cell B33 = Sum(A33:$A$100)

But I want the sum range to change, based on the value in cell C1.

If C1 = 100, then the sum range will = Sum(A1:$A$100),
Cell B33 = Sum(A33:$A$100)

If Cell C1 = 300, then the sum range will = Sum(A1:$A$300)
Cell B33 = Sum(A33:$A$300)

I tried using indirect but I could not figure it out.

Thanks for your help



That does not work because the last reference A300 must stay constant, and
A1 is the cell that changes

  #5   Report Post  
Posted to microsoft.public.excel.misc
Kleev
 
Posts: n/a
Default Summing a range that changes

This appears to do what you are asking for:

=SUM(INDIRECT("a" & ROW(A1) & ":a" & $C$1))

"Jeff" wrote:

Hi,

I have a formula that sums the range

Cell B1 = Sum(A1:$A$100)
and this is copied down to cell B100,
so Cell B33 = Sum(A33:$A$100)

But I want the sum range to change, based on the value in cell C1.

If C1 = 100, then the sum range will = Sum(A1:$A$100),
Cell B33 = Sum(A33:$A$100)

If Cell C1 = 300, then the sum range will = Sum(A1:$A$300)
Cell B33 = Sum(A33:$A$300)

I tried using indirect but I could not figure it out.

Thanks for your help



  #6   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Summing a range that changes

Try this

=SUM(INDIRECT("A"&ROW()&":A"&C1))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jeff" wrote in message
...
Hi,

I have a formula that sums the range

Cell B1 = Sum(A1:$A$100)
and this is copied down to cell B100,
so Cell B33 = Sum(A33:$A$100)

But I want the sum range to change, based on the value in cell C1.

If C1 = 100, then the sum range will = Sum(A1:$A$100),
Cell B33 = Sum(A33:$A$100)

If Cell C1 = 300, then the sum range will = Sum(A1:$A$300)
Cell B33 = Sum(A33:$A$300)

I tried using indirect but I could not figure it out.

Thanks for your help



  #7   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Summing a range that changes

Sorry that should be

=SUM(INDIRECT("A"&ROW()&":A"&$C$1))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jeff" wrote in message
...
Hi,

I have a formula that sums the range

Cell B1 = Sum(A1:$A$100)
and this is copied down to cell B100,
so Cell B33 = Sum(A33:$A$100)

But I want the sum range to change, based on the value in cell C1.

If C1 = 100, then the sum range will = Sum(A1:$A$100),
Cell B33 = Sum(A33:$A$100)

If Cell C1 = 300, then the sum range will = Sum(A1:$A$300)
Cell B33 = Sum(A33:$A$300)

I tried using indirect but I could not figure it out.

Thanks for your help



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
Summing a Range Omitting the Occasional #N/A Arturo Excel Worksheet Functions 2 September 28th 05 03:52 PM
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM
Can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 3 April 8th 05 07:36 AM
can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 1 April 7th 05 04:31 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


All times are GMT +1. The time now is 02:22 PM.

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"