SUMIF function summing the last 6 rows

Part16

New Member
Joined
Sep 7, 2014
Messages
19
Good mornign to all,

I am trying to sum the last 6 rows in a continuously growing table when a specific name in a different column (letters column) is met.

In the below example I would like to sum lets say the last 2 entries when the letter in the first column is C.

I can get the last 6 rows results with the below function but I can not apply SUMIF or anything like it to filter the data when a criteria is met.

Any help is very much appreciated.

=SUM(OFFSET(A1;MATCH(1E+30;A:A)-1;0;-6;1))

A
5
B4
C3
A3
B4
C5
A5
B4
C
3
A3
B4
C
5

<colgroup><col><col></colgroup><tbody>
</tbody>
 
Thanks Aladin,

It took me one year to gather the data... It will take one more to be able to use them effectively!!

Good night, once again your help was priceless. I don't think many would devote so much time for a stranger.


Hasta la vista!
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Thanks Aladin,

It took me one year to gather the data... It will take one more to be able to use them effectively!!

Good night, once again your help was priceless. I don't think many would devote so much time for a stranger.


Hasta la vista!

You're very welcome.
 
Upvote 0
Dear Aladin good morning again,

Food for thought once again...

I am now wondering if I could deactivate permanently the subtotal functions that I have in the first sheet and get the same outcome with a macro command, upon request.

In this sheet there are around 25 columns for each of the 20.000 rows and a header cell to each column where contains a subtotal function, calculating the average of the values for a current selection, when I apply a filter.

Because there are so many data to be calculated every time, excel is getting slower and slower so as to respond and thus I was wondering if there could be a solution where to get these averages (to the cells that already have this function) only when I push a button, for instance.

So I will have the flexibility to apply the filter as many times as I want and when I decide which is the right selection, to ask for these averages.

I use the subtotal value as I think that it is the only formula that can calculate values even when you apply a filter.

As usual, many thanks in advance.
 
Upvote 0
Dear Aladin good morning again,

Food for thought once again...

I am now wondering if I could deactivate permanently the subtotal functions that I have in the first sheet and get the same outcome with a macro command, upon request.

In this sheet there are around 25 columns for each of the 20.000 rows and a header cell to each column where contains a subtotal function, calculating the average of the values for a current selection, when I apply a filter.

Because there are so many data to be calculated every time, excel is getting slower and slower so as to respond and thus I was wondering if there could be a solution where to get these averages (to the cells that already have this function) only when I push a button, for instance.

So I will have the flexibility to apply the filter as many times as I want and when I decide which is the right selection, to ask for these averages.

I use the subtotal value as I think that it is the only formula that can calculate values even when you apply a filter.

As usual, many thanks in advance.

1) Have a look at decisionmodels.com for tips to speed a spreadsheet.

2) In view of (1), try to avoid formuals with INDIRECT or OFFSET, the so-called volatile functions.
 
Upvote 0

Forum statistics

Threads
1,216,590
Messages
6,131,614
Members
449,658
Latest member
JasonEncon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top