Set chart series endpoint dynamically

Joined
Apr 16, 2014
Messages
1
Reaction score
0
I have a chart series created with this formula:
Code:
=SERIES(Rolling_window_data!$B$2;Rolling_window_data!$A$3:$A$122;Rolling_window_data!$B$3:$B$122;1)
However I need to make the series line style different, depending on if a field in the range C3:C122 has a value different than #N/A, so I was thinking of making 2 series lines that overlap. So I need a loop going through cells C3:C122 and executing an IF statement to check for a value other than #N/A and if it finds one, that line should be the line where the 1st series ends and the 2nd one starts. So I basically need something along these lines, but correctly written :D :
Code:
=SERIES(Rolling_window_data!$B$2;Rolling_window_data!$A$3:IF(FOR Each Cell in Range("D3:D122") cell.value <> #N/A; Cell; "A122");Rolling_window_data!$B$3:$B$122;1)

P.S. You can find a longer post with graphic explanations here -> mrexcel.com/forum/excel-questions/771605-chart-series-set-start-end-dynamically.html#post3780291

Thank you for your time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top