Forum

Notifications
Clear all

[Solved] Series Values and dates

12 Posts
2 Users
0 Reactions
730 Views
(@retiredit)
Posts: 29
Eminent Member
Topic starter
 

I have a series values that looks like this ='2025'!$E$3:$E$14 and a series name that looks like this ='2025'!$E$2 where 2025 is the current year. Is there a way to either generate the year via formula or by referencing a cell that has a formula that computes the year?


 
Posted : 28/10/2025 8:54 pm
Riny van Eekelen
(@riny)
Posts: 1440
Member Moderator
 

@retiredit

Let's say the year 2025 is entered in cell A1, then you could use

=INDIRECT(A1 & "!$E$3:$E$14")

The other one would be similar. The trick is that you construct a text string for the range you want to reference, wrapped in  INDIRECT(...)

Does that work for you?


 
Posted : 28/10/2025 9:10 pm
(@retiredit)
Posts: 29
Eminent Member
Topic starter
 

Unfortunately, it doesn't, it generates an error, "That function isn't valid"

 


 
Posted : 28/10/2025 10:40 pm
Riny van Eekelen
(@riny)
Posts: 1440
Member Moderator
 

@retiredit Which Excel language version are you using?


 
Posted : 29/10/2025 12:05 am
(@retiredit)
Posts: 29
Eminent Member
Topic starter
 

I am using Office365 and I think the confusion is that this needs to be how I select data within a chart. Your formula works fine in a cell but not as a parameter for selecting series values in a chart


 
Posted : 29/10/2025 1:46 am
Riny van Eekelen
(@riny)
Posts: 1440
Member Moderator
 

@retiredit Can you upload a file demonstrating what exactly you are trying to achieve?


 
Posted : 29/10/2025 2:53 am
(@retiredit)
Posts: 29
Eminent Member
Topic starter
 

I'm in an Excel chart and I want to replace 2025 with the value in a cell and not have it static

image

 
Posted : 29/10/2025 2:59 am
Riny van Eekelen
(@riny)
Posts: 1440
Member Moderator
 

@retiredit Ah, yes! you can't use a formula to reference a chart series. What I would do then is use the indirect formula on a separate sheet for Chart Data based on the selection of the year. See attached file. It's just a smal example and I've worked with named ranges to grab the data for each year.


 
Posted : 29/10/2025 3:57 pm
(@retiredit)
Posts: 29
Eminent Member
Topic starter
 

@riny Thank you for your help


 
Posted : 29/10/2025 7:51 pm
(@retiredit)
Posts: 29
Eminent Member
Topic starter
 

I've been playing around with various solutions and I think I have one that works and would like your thoughts on the attached file. The answer appears to be that the workbook name needs to be used in the solution

 


 
Posted : 31/10/2025 3:44 am
(@retiredit)
Posts: 29
Eminent Member
Topic starter
 

Turns out that doesn't work either. Per our AI friends the only way around it is to create some VBA code to populate the chart data


 
Posted : 31/10/2025 7:11 am
Riny van Eekelen
(@riny)
Posts: 1440
Member Moderator
 

@retiredit Or use the solution I suggested earlier. Worked for me. Anyway, I can't help you with VBA. Sorry.


 
Posted : 31/10/2025 3:36 pm
Share:
0