Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Struggling with rotation and donut charts

Posted on 2013-12-11
Medium Priority
573 Views
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.
Curtain-Rotations.xlsx
0
Question by:simonwait
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 3
• 3

LVL 43

Expert Comment

ID: 39711018
Use this formula in column D

=C2/100-INT(C2/36000)*360
0

LVL 1

Author Comment

ID: 39712393
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...)

300
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
90
0

LVL 43

Expert Comment

ID: 39713142
Im not sure this works

What does not work? What is it supposed to do?
0

LVL 1

Author Comment

ID: 39713504
From the figures above the chart appears as in the image attached 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)
0

LVL 43

Accepted Solution

Saqib Husain, Syed earned 2000 total points
ID: 39728542
I have redone the entire thing using shapes and macros. Try it and give your comments.
Copy-of-Curtain-Rotations-1.xlsm
0

LVL 1

Author Comment

ID: 39735035
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.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.