I’ve been looking at a few related examples but I haven’t quite wrapped my head around how to put it all together.
I have a column B that starts in B2 and will have an ongoing (growing) list of values in rows. I want to SUM (actually, average, but we can just leave it at SUM for the sake of this question and simplicity) the last 12 values regardless of how many rows of data is currently there.
I determined I could use this to determine the row # of the last row with a value:
=MAX(NOT(ISBLANK(B2:B10000))*ROW(B2:B10000))-ROW(B2)+2
(Let’s call that “#”) And I imagine some sort of use of the OFFSET function could then be rolled in to start at B# and B(#-12) but I’m unclear how to use a number to reference a row/column number and not a value (I hope I’m explaining that well enough). Also I just learned about OFFSET a few mins ago and I still find its syntax/use a bit confusing. I got as far as determining that this would work for fixed values:
=SUM(OFFSET(B2,0,0,12,1))
This is the same as: SUM(B2:B13)
Can someone nudge me the rest of the way home?