Hello, this is a simple tip I have just figured out.....probably behind the times but here goes.
You have a big list of data grouped by some common factor (like Account in my example) and you want to use formula like countif, max and so on but you dont want to size offset to be a bit bigger than the largest range (lots of cells scanned needlessly wasting time).
I put in two columns which indicate an offset from the current row and the number of entries in that group and then use OFFSET to give me the range I need.
The basic form is OFFSET(cell in the column you want the data from,-Offset QtyCol,0,Entries,1)
Here is an example:
Row - Item - Entries - Offset - OFFSET Range
1 - a - 5 - 0 - Rows 1:5
2 - a - 5 - 1 - Rows 1:5
3 - a - 5 - 2 - Rows 1:5
4 - a - 5 - 3 - Rows 1:5
5 - a - 5 - 4 - Rows 1:5
6 - b - 3 - 0 - Rows 6:8
7 - b - 3 - 1 - Rows 6:8
8 - b - 3 - 2 - Rows 6:8
9 - c - 2 - 0 - Rows 9:10
10 - c - 2 - 1 - Rows 9:10
An example from Row 4 would be: OFFSET(row 4, -3,0,5,1) giving an answer covering rows 1:5.
Apologies if this has been repeated earlier but I could not reference to it directly.
Many thanks, Neil Good.
You have a big list of data grouped by some common factor (like Account in my example) and you want to use formula like countif, max and so on but you dont want to size offset to be a bit bigger than the largest range (lots of cells scanned needlessly wasting time).
I put in two columns which indicate an offset from the current row and the number of entries in that group and then use OFFSET to give me the range I need.
The basic form is OFFSET(cell in the column you want the data from,-Offset QtyCol,0,Entries,1)
Here is an example:
Row - Item - Entries - Offset - OFFSET Range
1 - a - 5 - 0 - Rows 1:5
2 - a - 5 - 1 - Rows 1:5
3 - a - 5 - 2 - Rows 1:5
4 - a - 5 - 3 - Rows 1:5
5 - a - 5 - 4 - Rows 1:5
6 - b - 3 - 0 - Rows 6:8
7 - b - 3 - 1 - Rows 6:8
8 - b - 3 - 2 - Rows 6:8
9 - c - 2 - 0 - Rows 9:10
10 - c - 2 - 1 - Rows 9:10
An example from Row 4 would be: OFFSET(row 4, -3,0,5,1) giving an answer covering rows 1:5.
Apologies if this has been repeated earlier but I could not reference to it directly.
Many thanks, Neil Good.