ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to sum the last 7 number in a row? (https://www.excelbanter.com/excel-discussion-misc-queries/188777-how-sum-last-7-number-row.html)

Learning excel

How to sum the last 7 number in a row?
 
This probably has an easy solution but I just cant figure it out. I have
search this discussion board but cant find anything.
Anyways I was wondering if there is a formula that sums the last 7 entries I
entered in the row.

An example would be.
D5 E5 F5 G5 H5 I5 J5 K5 L5 M5 N5 O5
2 5 1 3 5 1 0 2 4 2
D5 is where I want the sum of the last 7 numbers. and everyday I would add a
number at the back and do not want to change the range everytime I do so. is
there a way to make D5 return the last 7 numbers I have entered in the row
and will readjust everytime I add another number?

T. Valko

How to sum the last 7 number in a row?
 
Will there always be at least 7 numbers to sum? What should happen if there
isn't at least 7 numbers to sum?

--
Biff
Microsoft Excel MVP


"Learning excel" <Learning wrote in message
...
This probably has an easy solution but I just cant figure it out. I have
search this discussion board but cant find anything.
Anyways I was wondering if there is a formula that sums the last 7 entries
I
entered in the row.

An example would be.
D5 E5 F5 G5 H5 I5 J5 K5 L5 M5 N5 O5
2 5 1 3 5 1 0 2 4 2
D5 is where I want the sum of the last 7 numbers. and everyday I would add
a
number at the back and do not want to change the range everytime I do so.
is
there a way to make D5 return the last 7 numbers I have entered in the row
and will readjust everytime I add another number?




Learning Excel

How to sum the last 7 number in a row?
 
yes there will always be at least 7 numbers


"T. Valko" wrote:

Will there always be at least 7 numbers to sum? What should happen if there
isn't at least 7 numbers to sum?

--
Biff
Microsoft Excel MVP


"Learning excel" <Learning wrote in message
...
This probably has an easy solution but I just cant figure it out. I have
search this discussion board but cant find anything.
Anyways I was wondering if there is a formula that sums the last 7 entries
I
entered in the row.

An example would be.
D5 E5 F5 G5 H5 I5 J5 K5 L5 M5 N5 O5
2 5 1 3 5 1 0 2 4 2
D5 is where I want the sum of the last 7 numbers. and everyday I would add
a
number at the back and do not want to change the range everytime I do so.
is
there a way to make D5 return the last 7 numbers I have entered in the row
and will readjust everytime I add another number?





Brad

How to sum the last 7 number in a row?
 
Have a help cell - perhaps D3
=COUNT(E5:IV5)

and in cell D5
=SUM(INDIRECT("R5C"&MAX(5,D3-2)&":R5C"&D3+5,FALSE))

You may need to play with this one to make sure you know what it is doing....
--
Wag more, bark less


"Learning excel" wrote:

This probably has an easy solution but I just cant figure it out. I have
search this discussion board but cant find anything.
Anyways I was wondering if there is a formula that sums the last 7 entries I
entered in the row.

An example would be.
D5 E5 F5 G5 H5 I5 J5 K5 L5 M5 N5 O5
2 5 1 3 5 1 0 2 4 2
D5 is where I want the sum of the last 7 numbers. and everyday I would add a
number at the back and do not want to change the range everytime I do so. is
there a way to make D5 return the last 7 numbers I have entered in the row
and will readjust everytime I add another number?


Ron Rosenfeld

How to sum the last 7 number in a row?
 
On Sat, 24 May 2008 19:39:01 -0700, Learning excel <Learning
wrote:

This probably has an easy solution but I just cant figure it out. I have
search this discussion board but cant find anything.
Anyways I was wondering if there is a formula that sums the last 7 entries I
entered in the row.

An example would be.
D5 E5 F5 G5 H5 I5 J5 K5 L5 M5 N5 O5
2 5 1 3 5 1 0 2 4 2
D5 is where I want the sum of the last 7 numbers. and everyday I would add a
number at the back and do not want to change the range everytime I do so. is
there a way to make D5 return the last 7 numbers I have entered in the row
and will readjust everytime I add another number?



So long as there are at least 7 numbers, and they start in E5 and run
consecutively, then:

D5: =SUM(OFFSET(D5,0,COUNT(E5:IV5),1,-7))

might do it.
--ron

Learning Excel

How to sum the last 7 number in a row?
 
Thanks this works :P

"Brad" wrote:

Have a help cell - perhaps D3
=COUNT(E5:IV5)

and in cell D5
=SUM(INDIRECT("R5C"&MAX(5,D3-2)&":R5C"&D3+5,FALSE))

You may need to play with this one to make sure you know what it is doing....
--
Wag more, bark less


"Learning excel" wrote:

This probably has an easy solution but I just cant figure it out. I have
search this discussion board but cant find anything.
Anyways I was wondering if there is a formula that sums the last 7 entries I
entered in the row.

An example would be.
D5 E5 F5 G5 H5 I5 J5 K5 L5 M5 N5 O5
2 5 1 3 5 1 0 2 4 2
D5 is where I want the sum of the last 7 numbers. and everyday I would add a
number at the back and do not want to change the range everytime I do so. is
there a way to make D5 return the last 7 numbers I have entered in the row
and will readjust everytime I add another number?


T. Valko

How to sum the last 7 number in a row?
 
Try this:

=SUM(OFFSET(E5,,COUNT(E5:IV5)-1,,-7))


--
Biff
Microsoft Excel MVP


"Learning excel" wrote in message
...
yes there will always be at least 7 numbers


"T. Valko" wrote:

Will there always be at least 7 numbers to sum? What should happen if
there
isn't at least 7 numbers to sum?

--
Biff
Microsoft Excel MVP


"Learning excel" <Learning wrote in
message
...
This probably has an easy solution but I just cant figure it out. I
have
search this discussion board but cant find anything.
Anyways I was wondering if there is a formula that sums the last 7
entries
I
entered in the row.

An example would be.
D5 E5 F5 G5 H5 I5 J5 K5 L5 M5 N5 O5
2 5 1 3 5 1 0 2 4 2
D5 is where I want the sum of the last 7 numbers. and everyday I would
add
a
number at the back and do not want to change the range everytime I do
so.
is
there a way to make D5 return the last 7 numbers I have entered in the
row
and will readjust everytime I add another number?








All times are GMT +1. The time now is 07:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com