Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Paul Sheppard
 
Posts: n/a
Default Formula Help for Cumulative Result


I need help with a formula to calculate the cumulative result

If cell a1 contains May, what formula will give me the cumulative
result 15 based on the data in the table below


MAY
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Cum

1 2 3 4 5 6 15


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=503228

  #2   Report Post  
Posted to microsoft.public.excel.misc
broro183
 
Posts: n/a
Default Formula Help for Cumulative Result


Hi Paul,

=SUM(OFFSET($A$4,0,0,1,HLOOKUP($A$1,$A$2:$L$3,2,FA LSE)))

Will work assuming that:
*the month to accumulate upto is in cell A1
*the months of the yr are headers in row 2,
*the number of the month is in row 3 (eg Jan = 1, Feb = 2 etc, this row
can be hidden). (Someone else maybe able to suggest a way of bypassing
the need for this extra row), &
*row 4 contains your data to sum.

This works by setting the size of the sum range by basing the amount of
columns to include on the month entered in A1.

To make it easier for users to vary the months to include in the total
I'd also create a dropdown list in cell A1. This can be done by
selecting A1 [data - validation - settings], selecting "list" for the
Allow box & typing "=$A$2:$L$2" (or selcting the cells that the months
are in using the mouse) into the Source field.

hth,
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=503228

  #3   Report Post  
Posted to microsoft.public.excel.misc
Paul Sheppard
 
Posts: n/a
Default Formula Help for Cumulative Result


Hi Rob

Thanks for this

If anybody knows a way to do it without the hidden row I'd be grateful

broro183 Wrote:
Hi Paul,

=SUM(OFFSET($A$4,0,0,1,HLOOKUP($A$1,$A$2:$L$3,2,FA LSE)))

Will work assuming that:
*the month to accumulate upto is in cell A1
*the months of the yr are headers in row 2,
*the number of the month is in row 3 (eg Jan = 1, Feb = 2 etc, this row
can be hidden). (Someone else maybe able to suggest a way of bypassing
the need for this extra row), &
*row 4 contains your data to sum.

This works by setting the size of the sum range by basing the amount of
columns to include on the month entered in A1.

To make it easier for users to vary the months to include in the total
I'd also create a dropdown list in cell A1. This can be done by
selecting A1 [data - validation - settings], selecting "list" for the
Allow box & typing "=$A$2:$L$2" (or selcting the cells that the months
are in using the mouse) into the Source field.

hth,
Rob Brockett
NZ
Always learning & the best way to learn is to experience...



--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=503228

  #4   Report Post  
Posted to microsoft.public.excel.misc
broro183
 
Posts: n/a
Default Formula Help for Cumulative Result


Hi Paul,
I had another look & using the same assumptions as before except for
the need for a hidden row, the following will work;

=SUM(OFFSET($A$5,0,0,1,MATCH($A$1,$A$3:$L$3,0)))

Hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...
Paul Sheppard Wrote:
Hi Rob

Thanks for this

If anybody knows a way to do it without the hidden row I'd be grateful



--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=503228

  #5   Report Post  
Posted to microsoft.public.excel.misc
Paul Sheppard
 
Posts: n/a
Default Formula Help for Cumulative Result


Hi Rob

Thanks for this you are a star

broro183 Wrote:
Hi Paul,
I had another look & using the same assumptions as before except for
the need for a hidden row, the following will work;

=SUM(OFFSET($A$5,0,0,1,MATCH($A$1,$A$3:$L$3,0)))

Hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...



--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=503228



  #6   Report Post  
Posted to microsoft.public.excel.misc
broro183
 
Posts: n/a
Default Formula Help for Cumulative Result


Hi Paul,
No problem, thanks for the feedback.

Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=503228

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
Is there a formula to spell out a number in excel? Sha-nay-nay Excel Worksheet Functions 2 December 18th 04 09:25 PM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM
Formula Result Correct but value in the cell is wrong jac Excel Worksheet Functions 2 December 17th 04 08:05 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Excel 2003 - Formula result shows as 0:00 Serena Excel Worksheet Functions 4 November 11th 04 10:18 PM


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