简体   繁体   中英

Excel offset function for multiple columns

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM