Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Summing the last 7 non-blank entries in a row of data

I have a continually growing row of data that I want to sum automatically.
An example is: I want to store the sum in cell A1, data is currently in cell
B1, C1, E1, F1, and H1. B1=2, C1=3, E1=1, F1=4, H1=2. I want the result in
A1 to = 12. The next day I add data to cells I1, J1, K1, and M1, where I1=2,
J1=3, K1=2, M1=5. After adding the new data, I want the result in A1 =
E1+F1+H1+I1+J1+K1+M1 = 19. I found the following equation in one of the
discussion threads for this scenario, but I noticed it doesn't add up
correctly. Is there a way to do do this? Any help would be appreciated!

Found equation: =SUM(OFFSET(B1,,COUNTA(B1:CO1),,-(MIN(COUNTA(B1:CO1),7))))
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Summing the last 7 non-blank entries in a row of data

Hi!

There's a difference in the two segments:

The first set is of 7 cells (but not 7 numbers) and the next set you want
the last 7 numbers.

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(COUNT(B1:IV1)<7,SUM(B1:IV1),SUM(IV1:INDEX(B1:I V1,LARGE(IF(B1:IV1<"",COLUMN(B1:IV1)-1),7))))

If there are less than 7 entries all will be summed, otherwise only the last
7 entries will be summed.

Biff

"not an excel guru" <not an excel wrote in
message ...
I have a continually growing row of data that I want to sum automatically.
An example is: I want to store the sum in cell A1, data is currently in
cell
B1, C1, E1, F1, and H1. B1=2, C1=3, E1=1, F1=4, H1=2. I want the result
in
A1 to = 12. The next day I add data to cells I1, J1, K1, and M1, where
I1=2,
J1=3, K1=2, M1=5. After adding the new data, I want the result in A1 =
E1+F1+H1+I1+J1+K1+M1 = 19. I found the following equation in one of the
discussion threads for this scenario, but I noticed it doesn't add up
correctly. Is there a way to do do this? Any help would be appreciated!

Found equation: =SUM(OFFSET(B1,,COUNTA(B1:CO1),,-(MIN(COUNTA(B1:CO1),7))))



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Summing the last 7 non-blank entries in a row of data

Biff,

Sorry for the late reply, I was in a training class last week and didn't get
back too my problem. I tried it out and your equation worked to sum the last
5. I changed the last part from Column(B1:IV1)-1 to Column(B1:IV1)-3 and
that summed the last 7. I don't understand why that worked and yours summed
5 cells. Thank you so much for the help!!!!

"Biff" wrote:

Hi!

There's a difference in the two segments:

The first set is of 7 cells (but not 7 numbers) and the next set you want
the last 7 numbers.

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(COUNT(B1:IV1)<7,SUM(B1:IV1),SUM(IV1:INDEX(B1:I V1,LARGE(IF(B1:IV1<"",COLUMN(B1:IV1)-1),7))))

If there are less than 7 entries all will be summed, otherwise only the last
7 entries will be summed.

Biff

"not an excel guru" <not an excel wrote in
message ...
I have a continually growing row of data that I want to sum automatically.
An example is: I want to store the sum in cell A1, data is currently in
cell
B1, C1, E1, F1, and H1. B1=2, C1=3, E1=1, F1=4, H1=2. I want the result
in
A1 to = 12. The next day I add data to cells I1, J1, K1, and M1, where
I1=2,
J1=3, K1=2, M1=5. After adding the new data, I want the result in A1 =
E1+F1+H1+I1+J1+K1+M1 = 19. I found the following equation in one of the
discussion threads for this scenario, but I noticed it doesn't add up
correctly. Is there a way to do do this? Any help would be appreciated!

Found equation: =SUM(OFFSET(B1,,COUNTA(B1:CO1),,-(MIN(COUNTA(B1:CO1),7))))




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
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 04:39 PM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
Insert blank rows repeatedly between every data row in Excel Cool Excel Discussion (Misc queries) 2 January 9th 06 12:10 PM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM


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