Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Erika
 
Posts: n/a
Default Sum Variable Ranges

I have a spreadsheet and I would like to add up a range of numbers but the
range is variable - I did a named range and that worked great until I did a
sort.

Is it possible for me to have a sum function stop when it reaches a cell
that has the word "stop" typed in a cell? Or can I type a number in a cell
and the number would represent the row number I would like the sum to stop at?

Any suggestions would be great!
Thanks,
Erika
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Erika,

=SUM(INDIRECT("A1:A" & MATCH("Stop",A:A,FALSE)))

HTH,
Bernie
MS Excel MVP

"Erika" wrote in message
...
I have a spreadsheet and I would like to add up a range of numbers but the
range is variable - I did a named range and that worked great until I did

a
sort.

Is it possible for me to have a sum function stop when it reaches a cell
that has the word "stop" typed in a cell? Or can I type a number in a

cell
and the number would represent the row number I would like the sum to stop

at?

Any suggestions would be great!
Thanks,
Erika



  #3   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Erika,

For your second idea,

=SUM(INDIRECT("A1:A" & B1))

Enter the stopping row number into cell B1.

HTH,
Bernie
MS Excel MVP

"Erika" wrote in message
...
I have a spreadsheet and I would like to add up a range of numbers but the
range is variable - I did a named range and that worked great until I did

a
sort.

Is it possible for me to have a sum function stop when it reaches a cell
that has the word "stop" typed in a cell? Or can I type a number in a

cell
and the number would represent the row number I would like the sum to stop

at?

Any suggestions would be great!
Thanks,
Erika



  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

To sum col. A, starting at A1 and ending at row X, use:

=SUM(OFFSET(A1,,,F1))

where F1 holds X. Or with the word "stop" in col. B next
to the last row to sum:

=SUM(OFFSET(A1,,,MATCH("stop",B:B,0)))

HTH
Jason
Atlanta, GA


-----Original Message-----
I have a spreadsheet and I would like to add up a range

of numbers but the
range is variable - I did a named range and that worked

great until I did a
sort.

Is it possible for me to have a sum function stop when

it reaches a cell
that has the word "stop" typed in a cell? Or can I type

a number in a cell
and the number would represent the row number I would

like the sum to stop at?

Any suggestions would be great!
Thanks,
Erika
.

  #5   Report Post  
Erika
 
Posts: n/a
Default

I used the following formula
=SUM(INDIRECT("D3:D"&MATCH("Stop",$D$3:$D$500,FALS E)))

The word stop is in cell D27 - it seems to be working great however it stops
summing at cell D25. Any ideas?

"Erika" wrote:

I have a spreadsheet and I would like to add up a range of numbers but the
range is variable - I did a named range and that worked great until I did a
sort.

Is it possible for me to have a sum function stop when it reaches a cell
that has the word "stop" typed in a cell? Or can I type a number in a cell
and the number would represent the row number I would like the sum to stop at?

Any suggestions would be great!
Thanks,
Erika



  #6   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
use:
=SUM(INDIRECT("D3:D"&MATCH("Stop",$D$3:$D$500,FALS E)+2))

--
Regards
Frank Kabel
Frankfurt, Germany

Erika wrote:
I used the following formula
=SUM(INDIRECT("D3:D"&MATCH("Stop",$D$3:$D$500,FALS E)))

The word stop is in cell D27 - it seems to be working great however
it stops summing at cell D25. Any ideas?

"Erika" wrote:

I have a spreadsheet and I would like to add up a range of numbers
but the range is variable - I did a named range and that worked
great until I did a sort.

Is it possible for me to have a sum function stop when it reaches a
cell
that has the word "stop" typed in a cell? Or can I type a number in
a cell and the number would represent the row number I would like
the sum to stop at?

Any suggestions would be great!
Thanks,
Erika



  #7   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Erika,

Match returns the index of the cell that it matches, not necessarily the row
number. To get it to return the actual row number, either change the $D$3
to $D$1 so that the index and row numbers agree or, better yet, use all of
column D:

=SUM(INDIRECT("D3:D"&MATCH("Stop",D:D,FALSE)))

HTH,
Bernie
MS Excel MVP

"Erika" wrote in message
...
I used the following formula
=SUM(INDIRECT("D3:D"&MATCH("Stop",$D$3:$D$500,FALS E)))

The word stop is in cell D27 - it seems to be working great however it

stops
summing at cell D25. Any ideas?

"Erika" wrote:

I have a spreadsheet and I would like to add up a range of numbers but

the
range is variable - I did a named range and that worked great until I

did a
sort.

Is it possible for me to have a sum function stop when it reaches a cell
that has the word "stop" typed in a cell? Or can I type a number in a

cell
and the number would represent the row number I would like the sum to

stop at?

Any suggestions would be great!
Thanks,
Erika



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
Problem with graph ranges No Such Luck Charts and Charting in Excel 6 December 3rd 04 01:09 PM
Variable Print Ranges Zshepherd Excel Discussion (Misc queries) 0 December 2nd 04 03:23 PM
compare unique identifiers in multiple ranges bawilli_91125 Charts and Charting in Excel 1 November 30th 04 06:34 PM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 10:51 AM.

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"