Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Sum Number of Rows based on Value in Another Cell

Hi,

Not sure that the subject line described what I want to do very well, I know
that there is a long-winded way of doing what I want to do, but at the same
time I know there must be a quicker and better way, so here goes.

I'd like to to able to write a formula that will sum a number of rows, so as
to create a 'year to date' column in my spreadsheet.

I've put an example of what my worksheet contains below, and put simply I'd
like the YTD column to be a sum of the values in column B, e.g. the YTD value
for month 2 should be the sum of months 1&2, the YTD value for month 4 should
be the sum of months 1-4, etc.

A B C
Month Value YTD
1 100 100
2 150 250
3 75 325
4 100 425

As I said, I know I could write a slightly different formula in each cell of
Coumn C to achieve this, but I'm sure there must be a more efficient way,
i.e. I want to create a formula for this column in cell C1 and copy it down
into the other 11 rows, so that I have year to date values for each month.

Am I missing something, or just being dumb? I feel sure there's an easy way
to do this and I just don't know what it is.

Any help greatly appreciated as always...





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Sum Number of Rows based on Value in Another Cell

In C2 enter =SUM($B$2:B2) this will give 100
Double click B2's fill handle (small solid square in lower right corner) to
copy this down the column
Now you have the sums needed
Not the $s in $B$2 cause it to remain unchanged as you copy the formula -
call "absolute reference"
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Dickie Worton" wrote in message
...
Hi,

Not sure that the subject line described what I want to do very well, I
know
that there is a long-winded way of doing what I want to do, but at the
same
time I know there must be a quicker and better way, so here goes.

I'd like to to able to write a formula that will sum a number of rows, so
as
to create a 'year to date' column in my spreadsheet.

I've put an example of what my worksheet contains below, and put simply
I'd
like the YTD column to be a sum of the values in column B, e.g. the YTD
value
for month 2 should be the sum of months 1&2, the YTD value for month 4
should
be the sum of months 1-4, etc.

A B C
Month Value YTD
1 100 100
2 150 250
3 75 325
4 100 425

As I said, I know I could write a slightly different formula in each cell
of
Coumn C to achieve this, but I'm sure there must be a more efficient way,
i.e. I want to create a formula for this column in cell C1 and copy it
down
into the other 11 rows, so that I have year to date values for each month.

Am I missing something, or just being dumb? I feel sure there's an easy
way
to do this and I just don't know what it is.

Any help greatly appreciated as always...






  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Sum Number of Rows based on Value in Another Cell

Hi Bernard,

That's exactly what I wanted, thank you very much.

I knew the answer would be fiendishly simple, and it was, but I just
couldn't think of it!

Kind regards,

Dickie

"Bernard Liengme" wrote:

In C2 enter =SUM($B$2:B2) this will give 100
Double click B2's fill handle (small solid square in lower right corner) to
copy this down the column
Now you have the sums needed
Not the $s in $B$2 cause it to remain unchanged as you copy the formula -
call "absolute reference"
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Dickie Worton" wrote in message
...
Hi,

Not sure that the subject line described what I want to do very well, I
know
that there is a long-winded way of doing what I want to do, but at the
same
time I know there must be a quicker and better way, so here goes.

I'd like to to able to write a formula that will sum a number of rows, so
as
to create a 'year to date' column in my spreadsheet.

I've put an example of what my worksheet contains below, and put simply
I'd
like the YTD column to be a sum of the values in column B, e.g. the YTD
value
for month 2 should be the sum of months 1&2, the YTD value for month 4
should
be the sum of months 1-4, etc.

A B C
Month Value YTD
1 100 100
2 150 250
3 75 325
4 100 425

As I said, I know I could write a slightly different formula in each cell
of
Coumn C to achieve this, but I'm sure there must be a more efficient way,
i.e. I want to create a formula for this column in cell C1 and copy it
down
into the other 11 rows, so that I have year to date values for each month.

Am I missing something, or just being dumb? I feel sure there's an easy
way
to do this and I just don't know what it is.

Any help greatly appreciated as always...






.

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
Counting the number of rows based on the color Gan Excel Discussion (Misc queries) 2 November 3rd 09 05:18 PM
Extracting Rows based on a number in a field Yookaroo Excel Worksheet Functions 2 June 26th 09 10:46 PM
Rows based on number of items Jack Excel Discussion (Misc queries) 0 January 13th 09 05:22 PM
Insert a number of rows based on a value in a cell on active row iRocco Excel Discussion (Misc queries) 1 August 11th 05 06:18 AM
Insert a number of rows based on a value in a cell on active row iRocco Excel Worksheet Functions 0 August 10th 05 08:46 PM


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