Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Calculating a sum from a given number of rows

Hello,

I'm looking for a formula that can calculate the sum of a number of
rows given. In the example below the formula should output the sum of
the figures from the last 7 rows (starting from the right to the
left).

---------------------------------------------
Rows (from right to left) A1: 7

A B C D E F G H I J K
4 5 3 2 8 9 5 6 3 2 4

Output: sum rows E-K
---------------------------------------------

I used to calculate this using a IF formula, however that only worked
until i reached the maximum of 6 IF brackets "()".

Does anybody has an idea?

Thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Calculating a sum from a given number of rows

One way:

=SUM(OFFSET(E1,0,0,1,A1)

Note: The standard term for the group of cells going down under "A" is a
column. The standard interpretation of 'row' is cells going across.

In article
,
tunupo wrote:

Hello,

I'm looking for a formula that can calculate the sum of a number of
rows given. In the example below the formula should output the sum of
the figures from the last 7 rows (starting from the right to the
left).

---------------------------------------------
Rows (from right to left) A1: 7

A B C D E F G H I J K
4 5 3 2 8 9 5 6 3 2 4

Output: sum rows E-K
---------------------------------------------

I used to calculate this using a IF formula, however that only worked
until i reached the maximum of 6 IF brackets "()".

Does anybody has an idea?

Thanks!!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Calculating a sum from a given number of rows

It depends!

You want the sum of the last 7 entries from right to left. What if there
aren't 7 entries? Might there be any empty/blank cells in-between? Like
this:

A B C D E F G H I J K
4 5 3 2 8 9 6 3 4

In that case, do you want the sum of the last 7 entries or the last 7 cells.
If you want the last 7 *entries* the result would be 35. If you want the sum
of the last 7 *cells* the result would be 30.


--
Biff
Microsoft Excel MVP


"tunupo" wrote in message
...
Hello,

I'm looking for a formula that can calculate the sum of a number of
rows given. In the example below the formula should output the sum of
the figures from the last 7 rows (starting from the right to the
left).

---------------------------------------------
Rows (from right to left) A1: 7

A B C D E F G H I J K
4 5 3 2 8 9 5 6 3 2 4

Output: sum rows E-K
---------------------------------------------

I used to calculate this using a IF formula, however that only worked
until i reached the maximum of 6 IF brackets "()".

Does anybody has an idea?

Thanks!!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Calculating a sum from a given number of rows

Thanks for your helpful replies. I could work it out as follows:

=Sum(Offset(K1,0,0,1,-A1))

Whereas K1 stands for the last column with numbers and A1 stands for
the input of number of cells to calculate back.

Many thanks!
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
Calculating rows Jacks89 New Users to Excel 1 November 23rd 07 07:23 PM
Calculating volume and number. Jim Smith Excel Worksheet Functions 0 February 17th 06 07:48 PM
Inserted Rows not re-calculating klam Excel Discussion (Misc queries) 4 August 25th 05 08:25 PM
Text number to number value for calculating ddiebold7 Excel Worksheet Functions 3 June 13th 05 12:48 PM
deleting rows--calculating formulas with each row as it goes? Lonnie Excel Discussion (Misc queries) 1 December 14th 04 08:15 PM


All times are GMT +1. The time now is 12:19 AM.

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"