OFFSET Setup working in large lists

NeilGood

New Member
Joined
Feb 22, 2011
Messages
1
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.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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