Reputation: 453
I want to use excel offset function to build a dynamic chart. Basically, I want my line chart always show the data for last 5 days. I know how to do it for a single variable, but for multiple variables, I have no idea. Can you help me?
My data is in below format. enter image description here
In the chart, there should be four dynamic lines--area1 vol, are2 vol, area3 vol, and the total vol.
Thank you.
Upvotes: 0
Views: 1205
Reputation:
Assuming Date is in A1 then,
=index(A:I, match(today()-4, A:A, 0), 0):index(A:I, match(today(), A:A, 0), 0)
Avoid the volatile OFFSET whenever possible; it usually can be done.
Upvotes: 2