Spedometer Type Chart (Donut) - Help with Formula

rconverse

Well-known Member
Joined
Nov 29, 2007
Messages
1,187
I'm trying to duplicate a chart from this tutorial.

http://www.datapigtechnologies.com/flashfiles/gaugechart.html

I've got everything working, expcept I don't want the chart to start at 0% and end at 100%. I want the lowest part of the chart to be 90%. I can't get the pointer to work correctly. Here are the formulas.

E1 is the fill rate. So in this example, let's say that value is 93%.
H10 is the highest value on my chart. That's 100%.

H1 is what ends moving the slice or "pointer".
=MOD(270+180*E1/H10,360)

Around the "spedometer", I have five labels. However, instead of having (going clockwise) 0, 25%, 50%, 75%, 100%, I have 90%, 92.5%, 95%, 97.5%, 100%. The result of the equation above tells VBA (code below) where to move the slice to represent the correct value. Again though, it's not corresponding correctly with the labels I'm using.

Does anyone know a way I can change the formula to be more dynamic with the labels?

Rich (BB code):
Application.ScreenUpdating = False

ActiveSheet.ChartObjects("Chart 2").Activate

ActiveChart.ChartGroups(1).FirstSliceAngle = ActiveSheet.Range("H1")

Worksheets("sheet1").Activate

Range("A1").Select

Application.ScreenUpdating = True

Thanks,
Roger
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
A challenge to the MVPs of the board? I say no one can solve this. No one is smart enough.

(*end reverse psychology*) :)
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,973
Members
449,059
Latest member
oculus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top