can the OFFSET reference be a formula?

JWolkie

New Member
Joined
Sep 25, 2006
Messages
8
I've got a formula that adds the 12 most recent item numbers,

=SUM(OFFSET(Y3,-1,-11,1,12))

but I would like the OFFSET(Y3,...) reference to be something like

=MAX(M3:AM3)

so that it automatically adjusts its reference towards the most recent item as I add more to the right of the list. The item number will be the highest, and rightmost, number.

How can I do that?

Thanks!
~Jacob~
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I guess what my question boils down to is:

Is there a way that a formula's cell reference can be replaced by a function (MAX)? Something like

=CELL("address",OFFSET(M3,0,MATCH(MAX(M3:AZ3),M3:AZ3,0)-1))

can return the address of the MAX, but I don't seem to be able to turn it back around into a formula.
 
Upvote 0
I guess what my question boils down to is:

Is there a way that a formula's cell reference can be replaced by a function (MAX)? Something like

=CELL("address",OFFSET(M3,0,MATCH(MAX(M3:AZ3),M3:AZ3,0)-1))

can return the address of the MAX, but I don't seem to be able to turn it back around into a formula.

=CELL("address",INDEX(M3:AZ3,MATCH(MAX(M3:AZ3),M3:AZ3,0)))
 
Upvote 0
> =CELL("address",INDEX(M3:AZ3,MATCH(MAX(M3:AZ3),M3:AZ3,0)))

That gives me the same thing, $Y$3 for example.

How could I get a cell address output, such as $Y$3, to be used as the reference for a formula like

=SUM(OFFSET(Y3,-1,-11,1,12))

?
 
Upvote 0
> =CELL("address",INDEX(M3:AZ3,MATCH(MAX(M3:AZ3),M3:AZ3,0)))

That gives me the same thing, $Y$3 for example.

How could I get a cell address output, such as $Y$3, to be used as the reference for a formula like

=SUM(OFFSET(Y3,-1,-11,1,12))

?

=SUM(OFFSET(INDEX(M3:AZ3,MATCH(MAX(M3:AZ3),M3:AZ3,0)),-1,-11,1,12))
 
Upvote 0
> =SUM(OFFSET(INDEX(M3:AZ3,MATCH(MAX(M3:AZ3),M3:AZ3,0)),-1,-11,1,12))



... A thing of beauty. Thank you!
 
Upvote 0

Forum statistics

Threads
1,222,170
Messages
6,164,377
Members
451,886
Latest member
elpepe1970

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