Help in creating a chart

leontin

New Member
Joined
Apr 23, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi, guys. I'm pretty new to excel and i'm struggling to create a basic chart like in the image.
Can anyone help me with a video\tutorial or something to create this? I guess it's not complicated to do.
I have searched on the internet buy i couldn't find something similiar. I guess it will be a combination of doughnut with pie chart?

What i want is up to six pointers\lines, eache one of them coresponding to a value in a cell.
Example: cell: A1=25, A2=6 etc and i need pointers in the circle to match the value in the cell with the number in the circle and if no value in the cell then no pointer.

Thank you in advance.
 

Attachments

  • descărcare.png
    descărcare.png
    52.9 KB · Views: 14

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
@leontin Welcome to the forum
I don't think you can accomplish this without using vba.
If you are happy / able to include vba then let me know and i will try and help.
 
Upvote 0
@leontin Welcome to the forum
I don't think you can accomplish this without using vba.
If you are happy / able to include vba then let me know and i will try and help.
Thank you for your interest in helping me.
Yes, of course, I'm ok with VBA, my workbook is already macro-enabled, i have made some clickable buttons using VBA.
 
Upvote 0
What I am envisaging is that you edit the circle image image to remove the pointers. I have done that using Photoshop.
Then you will insert an appropriately sized and formatted pie chart to sit in the centre of the circel.

The major issue with trying to point to the numbers is that the 'Angle of first sector rotation' will vary with each first number.
As an absolute minimum, it will need vba to detect and make change to this angle.
Other than that, I think I can use formulas and helper columns to determine the Pie chart values required to point to the 1 - 6 values in column A

Does this sound like a workable approach for you?
 
Upvote 0
Here goes....

Assuming your number entries are in A1 : A6 and that you set up the helper columns. (helper columns may be hidden if you wish)

Copy / paste the XL2BB below.
PERSONAL.XLSB
ABCDEFGHIJ
1NumberRotationRefRotationOrderedPie %
21900A1   
31224A230  
45258A3 3018.611
5223341A41849724.167
66439A527218424.444
75184A69727232.778
8697
97301Rotate
10815530
119262
1210175Hide
1311136FALSE
1412321
1513117
1614243
171520
1816204
191778
2018282
211930
2220233
232149
2422272
2523165
2624194
272568
2826351
2927107
3028311
3129292
3230146
3331253
343210
3533214
363488
3735331
3836127
Sheet3
Cell Formulas
RangeFormula
H2:H7H2=IFERROR(LARGE($F$2:$F$7,ROWS(H1:H$6)),"")
I2:I6I2=IF(H2="","",(H3-H2)/3.6)
I7I7=IF(H7="","",(100-SUM(I2:I6)))
F2:F7F2=IF(A1="","",INDEX($D$2:$D$38,MATCH(A1,$C$2:$C$38,0)))
I10I10=MIN(H2:H7)
I13I13=COUNTA(A1:A6)=0
Cells with Data Validation
CellAllowCriteria
A1:A6Whole numberbetween 0 and 36


Ideally, set Data validation for the input range A1:A6 to limit entry to Numbers 0 to 36.

Then insert a Pie chart and the edited image of your "Circle' such that the original lines have been removed.

Screenshot 2021-04-24 at 12.45.37.png


Set the Pie chart Data Range to I2:I7 Size the Pie to fit the inner circle. Remove Legend etc.
Format to the Data Series Fill to 'No Fill" Border Colour - Black. Shadow Pre-Set is set to No Shadow etc so that the whole chart is simple black and white.
Position the image over the chart. White fill the surrounding cell range.

Copy paste the following code to the Worksheet Code Module

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target, Range("A1:A6")) Is Nothing Then Exit Sub
'***** EDIT THE CHART NAME below TO SUIT ******
ActiveSheet.ChartObjects("Chart 4").Chart.Rotation = Range("I10").Value
ActiveSheet.ChartObjects("Chart 4").Visible = Not (Range("I13").Value)

End Sub

Determine your chart name and edit the code accordingly.

Then see if it works?
 
Upvote 0
Solution
So, you need the chart over white cells and the circle over the chart.

Below is the circle without lines.
descarcare.png
 
Upvote 0
wow, it's more complex than i thought. I will try it later today and i will let you know. thank you for your help!
 
Upvote 0
Here goes....

Assuming your number entries are in A1 : A6 and that you set up the helper columns. (helper columns may be hidden if you wish)

Copy / paste the XL2BB below.
PERSONAL.XLSB
ABCDEFGHIJ
1NumberRotationRefRotationOrderedPie %
21900A1   
31224A230  
45258A3 3018.611
5223341A41849724.167
66439A527218424.444
75184A69727232.778
8697
97301Rotate
10815530
119262
1210175Hide
1311136FALSE
1412321
1513117
1614243
171520
1816204
191778
2018282
211930
2220233
232149
2422272
2523165
2624194
272568
2826351
2927107
3028311
3129292
3230146
3331253
343210
3533214
363488
3735331
3836127
Sheet3
Cell Formulas
RangeFormula
H2:H7H2=IFERROR(LARGE($F$2:$F$7,ROWS(H1:H$6)),"")
I2:I6I2=IF(H2="","",(H3-H2)/3.6)
I7I7=IF(H7="","",(100-SUM(I2:I6)))
F2:F7F2=IF(A1="","",INDEX($D$2:$D$38,MATCH(A1,$C$2:$C$38,0)))
I10I10=MIN(H2:H7)
I13I13=COUNTA(A1:A6)=0
Cells with Data Validation
CellAllowCriteria
A1:A6Whole numberbetween 0 and 36


Ideally, set Data validation for the input range A1:A6 to limit entry to Numbers 0 to 36.

Then insert a Pie chart and the edited image of your "Circle' such that the original lines have been removed.

View attachment 37437

Set the Pie chart Data Range to I2:I7 Size the Pie to fit the inner circle. Remove Legend etc.
Format to the Data Series Fill to 'No Fill" Border Colour - Black. Shadow Pre-Set is set to No Shadow etc so that the whole chart is simple black and white.
Position the image over the chart. White fill the surrounding cell range.

Copy paste the following code to the Worksheet Code Module

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target, Range("A1:A6")) Is Nothing Then Exit Sub
'***** EDIT THE CHART NAME below TO SUIT ******
ActiveSheet.ChartObjects("Chart 4").Chart.Rotation = Range("I10").Value
ActiveSheet.ChartObjects("Chart 4").Visible = Not (Range("I13").Value)

End Sub

Determine your chart name and edit the code accordingly.

Then see if it works?


I have tested right now and works like a charm! Exactly what I wanted. Thank You so much!
 

Attachments

  • Untitled.png
    Untitled.png
    160.8 KB · Views: 6
Upvote 0
Good to hear and, you are most welcome. It was an interesting little puzzle to crack.
 
Upvote 0
Good to hear and, you are most welcome. It was an interesting little puzzle to crack.
Hi, Snakehips. I have discovered a problem. I have applied the code to my main worksheet and apparently it's not working because the A1:A6 cells for the input of the numbers contains a formula.
Pointers indicating diferent numbers or none at all... How can i workaround this? Waiting for your reply. Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,397
Members
448,957
Latest member
Hat4Life

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