Conditional Chart Data Range

default_name

Board Regular
Joined
May 16, 2018
Messages
180
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Hey guys,

I have a workbook that charts data for various dates.
I want the chart (called "Chart 6") to display different ranges of data as the years go on.

When I select my chart and go to Select Data, then the Select Data Source window pops up.
Currently, the chart is displaying data from the following Chart Data Range:
Code:
=Visuals!$E$13:$BM$25

I want to implement something like this:
Code:
=IF(YEAR(TODAY()=2020,Visuals!$E$13:$BM$25,IF(YEAR(TODAY()=2021,Visuals!$E$13:$BY$25,Visuals!$E$13:$CK$25))))

However, trying to do this results in a "That function isn't valid" error. Apparently it cannot be done in this manner.

Can this be done some other way?

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Adding a little bit of clarification:

Basically, the chart currently displays data from $E$13:$BM$25
Next year (2021) I would like it to automatically update to display data from $E$13:$BY$25
Then $E$13:$CK$25 the following year (2022)

Would something like this require VBA to achieve? Thanks in advance
 
Upvote 0

Forum statistics

Threads
1,223,775
Messages
6,174,458
Members
452,566
Latest member
Bonnie_bb

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