- Joined
- Apr 16, 2014
- Messages
- 1
- Reaction score
- 0
I have a chart series created with this formula:
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 :
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.
Code:
=SERIES(Rolling_window_data!$B$2;Rolling_window_data!$A$3:$A$122;Rolling_window_data!$B$3:$B$122;1)
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.