Creating an Excel Rolling Chart

TomasTeix

New Member
Joined
May 8, 2024
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I´m having trouble creating a rolling chart regarding the syntax of the OFFSET Function for specifying a dynamic range. i want to make the table so that. when a new column header is added, the same values of previous collumns are added bellow this new collumn header aswell. I´m doing this by `Defining Names´ and then adding a `New Name´ . In the `Refers To´ section I´m writing the following (I have 2 sheets, and 2 Tables on the sheet I´m using):

Excel Formula:
=OFFSET(TableName[[#Headers];[Value in Header]],COUNT(TableName[#Headers])0,-20,1)

I want o select the last 20 columns. Im getting a syntax error message. Why is this not working?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Since you have 365, maybe try with TAKE(TableName[[#Headers],,-20). That will dynamically return the last 20 columns.

With offset, you can try this =OFFSET(XLOOKUP("zzzz",TableName[#Headers];Table1[#Headers],,-1;2),,,,-20)
 
Last edited:
Upvote 0
Can you share a sample data?

I noticed, I forgot to update the second Table Reference, maybe that was the cause.
=OFFSET(XLOOKUP("zzzz",TableName[#Headers];TableName[#Headers],,-1;2),,,,-20)

This dummy chat is created using the take function.
1715607328420.png


Book1
DEFGHIJKLMNOPQRSTUVWXYZAA
2Any Col TitleAny Col Title2Any Col Title3Any Col Title4Any Col Title5Any Col Title6Any Col Title7Any Col Title8Any Col Title9Any Col Title10Any Col Title11Any Col Title12Any Col Title13Any Col Title14Any Col Title15Any Col Title16Any Col Title17Any Col Title18Any Col Title19Any Col Title20Any Col Title21Any Col Title22Prev endCur End
3239715128179256151252517919821816141113
4610918924211451882510231115241762118171011
5818119108252016812212471417212213136252422
62023151025122562471717622121025925151591914
7
8
9
10
11Any Col Title5Any Col Title6Any Col Title7Any Col Title8Any Col Title9Any Col Title10Any Col Title11Any Col Title12Any Col Title13Any Col Title14Any Col Title15Any Col Title16Any Col Title17Any Col Title18Any Col Title19Any Col Title20Any Col Title21Any Col Title22Prev endCur End
12128179256151252517919821816141113
13924211451882510231115241762118171011
14108252016812212471417212213136252422
1525122562471717622121025925151591914
Sheet1
Cell Formulas
RangeFormula
D3:AA6D3=RANDBETWEEN(5,25)
D11:W15D11=VSTACK(TAKE(Table1[#Headers],,-20),TAKE(Table1,,-20))
Dynamic array formulas.
 
Upvote 1
Solution

Forum statistics

Threads
1,223,868
Messages
6,175,084
Members
452,611
Latest member
bls2024

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