0

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

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.

3
  • Please provide the expected output for the sample data. Better in a table form than a graph. Commented Apr 13, 2017 at 22:56
  • You may be able to use Aggregate instead. Where is the source data? Commented Apr 13, 2017 at 23:12
  • what do you mean by source? just excel data. Commented Apr 14, 2017 at 17:25

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

seemly, you have selected all the range, not just the colume B, D, F, and G. I can not put the rang into the chart using "select data".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.