Struggling with rotation and donut charts

Following getting some help on a previous question Old Quesiton I thought I had it all sorted and closed the question however I've now discovered an issue I didn't anticipate.

As can be seen in the attached Excel workbook.  I have donut chart showing the positions of some curtains on a circular track.  There are 4 curtains on an outer track and one curtain on an inner track.  In the example the curtains all move about 5 times so there are 5 groups of numbers and charts

The columns are:-

A - The Label of the points of each curtain (a startting point and ending point for each curtain).
B - The colour of the curtain
C - The position of the point.  This is essentially in degrees with trailing 00's with 0 at the top centre.  This number can be negative or multiple rotations
D- I was trying to break the figure in C into a single rotation of a circle in degrees thinking this may help
E - The segment size for the donut chart

So the rows with values only in col E are the remainder of a 360 circle not taken up by the segments with curtains.

My issue comes in that Im getting lost with negative values or anything more complicated than the curtains being in the 1st rotation.
Who is Participating?
Saqib Husain, SyedConnect With a Mentor EngineerCommented:
I have redone the entire thing using shapes and macros. Try it and give your comments.
Saqib Husain, SyedEngineerCommented:
Use this formula in column D

simonwaitAuthor Commented:
Thanks for that but Im not sure this works.  I think its because the values in Col D arent sorted into a numerical order.  The trouble is I need to keep the order the same (Outer1, Outer 2, Outer 3 etc...)

Outer 1      Red              42000      60                20
Outer 2      Red              40000      40                0.3
Outer 3      Yellow      39970      39.7      3        19.62
Outer 4      Yellow      35932      359.32       115.32
Outer 5      Orange      24400      244                37
Outer 6      Orange      20700      207                0
Outer 7      Green      20700      207                88
Outer 8      Green      11900      119                119
Inner 1      Blue                9000      90                90
Inner 2      Blue               -9000      270                180
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Saqib Husain, SyedEngineerCommented:
Im not sure this works

What does not work? What is it supposed to do?
simonwaitAuthor Commented:
From the figures above the chart appears as in the image attached Chart using data I think that the Red curtain should be between 40 & 60 degrees (around 2 o'clock) and the yellow should go from around 12 o'clock (359 deg) to close to the red (39.7 deg). The orange should be around 7/8 o'clock (207-244 deg) and the green should be quite large between about 4 oclock and 7 oclock (119 - 207 deg)
simonwaitAuthor Commented:
Wow that certainly looks like it will probably work.  I'm now trying to figure out what you have done so that I can use it in my workbook.  The idea being that as the code imports the figures it then also creates the image for those figures before moving down the sheet and importing the next set of figures.  I've got as far as understanding the if statements but I'm now trying to understand from when you start resolving x & y.
All Courses

From novice to tech pro — start learning today.