Thank you Aladin for your answer.
I am reading the function properties from online office assistant trying to understand my mistake and how all these are applied because as you can see I don't know almost anything about excel functions.
The function that worked correctly at the first time was this of Mr. Poulsom.
=SUMIF(OFFSET(A1;MATCH(1E+30;B:B)-1;;-6;1);"C";OFFSET(A1;MATCH(1E+30;B:B)-1;1;-6;1))
Let me try to show you an example of how I "decoded" it when I applied it to my file.
I have two sheets on my file, one named "Results" and the other named "Teams". "Results" sheet is a list why many values (dates, time, league and so on) that ends up to the column CL:CL which contains the goals scored by a team.
So when I tried to apply the above formula I thought of it like below.
A1 is the reference cell which in my case should be the first cell (CL1) to the left of the goals column (CM4:CM50000). So it should be replaced with "Results!CL1" , is that right?
"C" in my case should be the cell "Teams!B2" which is the cell that contains the name of the team (Teams!B:B, is the list with the team names)
B:B should be the column "Results!CM4:CM50000" that contains the goal number of each game where the team is involved.
The function has to be applied to the cell "Teams!C2" next to the name of each team so as to have the total goals scored during the last six games.
Thats all I can say, I don't have a better way to describe it.
In any case, solved or not solved, I have to say a big THANKS to all of you for your time and efforts!!
Here is the workbook:
https://dl.dropboxusercontent.com/u/65698317/Par16%20SUMIF%20function%20summing%20the%20last%206%20rows.xlsx
that implements the formula as I invoked:
[TABLE="width: 288"]
<COLGROUP><COL style="WIDTH: 48pt" span=6 width=64><TBODY>[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
A[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
5[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]
8[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"]
C[/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
B[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
4[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent, align: right"]
8[/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
C[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
3[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
A[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
3[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
B[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
4[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
C[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
5[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
A[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
5[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
B[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
4[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl66, width: 64, bgcolor: white"]
C[/TD]
[TD="class: xl67, width: 64, bgcolor: white"]
3[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
A[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
3[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]
B[/TD]
[TD="class: xl64, width: 64, bgcolor: white"]
4[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl66, width: 64, bgcolor: white"]
C[/TD]
[TD="class: xl67, width: 64, bgcolor: white"]
5[/TD]
[TD="class: xl63, width: 64, bgcolor: white"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
</TBODY>[/TABLE]
D1, either with the C condition in the formula...
=SUMIF(OFFSET(INDEX(A:A;MATCH(9,99999999999999E+307;B:B));0;0;-MIN(6;COUNT(B:B)));"C";B:B)
Or with the C condition in F1...
F1: C
and the formula in F2...
=SUMIF(OFFSET(INDEX(A:A;MATCH(9,99999999999999E+307;B:B));0;0;-MIN(6;COUNT(B:B)));F1;B:B)
adapted to your non-American system.