Doorgaan naar hoofdcontent

Excel: Butterfly Chart, Percentages Combined with Amounts

Based on an example in the Dutch magazine Elsevier I created this butterfly chart.


Here are the data from A1:C29:

Country Percentage Amount in Billions
Austria 1,1% 2,51
Belgium 1,5% 3,953
Bulgary 2,1% 0,578
Croatia 1,7% 0,745
Cyprus 2,1% 0,366
Czech Republic 1,1% 1,726
Denmark 1,4% 3,453
Estonia 1,9% 0,326
Finland 1,5% 2,846
France 2,3% 45,82
Germany 1,5% 35,591
Greece 2,5% 5,083
Hungary 0,8% 0,806
Ireland 0,6% 0,901
Italy 1,7% 26,433
Latvia 0,9% 0,202
Lithuania 1,0% 0,317
Luxembourg 0,6% 0,265
Malta 0,6% 0,041
Poland 1,9% 7,272
Portugal 1,8% 2,937
Romania 1,2% 1,698
Slovenia 1,2% 0,414
Slowakia 1,1% 0,797
Spain 0,8% 8,966
Sweden 1,2% 4,826
Netherlands 1,3% 7,648
UK 2,5% 47,294

To this I added a column Pillar in D1. From D2:D29 I filled in the value -10.

I created three names:

Amountlabels =Blad1!$C$2:$C$29
Percentage =Blad1!$B$2:$B$29*-1
PercentageLabels =Blad1!$B$2:$B$29*-1

Then I created a stacked bar graph based on the four data columns. I added to more series based on the names AmountLabels and PercentageLabels. The order should be like this:


The bar which refers to pillar I changed to no color. I added data labels to this one which I centered.

In the graph I based the column Percentage on the formula 

=Blad1!Percentage

AmountLabels and PercentageLabels should also be set to no color with the data labels set on, with the position respectively set to Inside End and Inside Base.

The horizontal axis is fixed on minimum -20 and maximum 60 and removed.

To replace the horizontal axis labels I created a label range from A32:AF33 as you can see in the file which you can download. Of this range I added the lower one as a line graph to the chart, linked tot the upper one as data labels. The color is then set to no color and the data labels switched on, changed into Category and positioned Right.

You can download the file Butterfly.zip through this link:

https://drive.google.com/folderview?id=0B7HgkOwFZtdZVmhRQUZFM28yc1U&usp=sharing


Reacties

Populaire posts van deze blog

Excel: VBA script om wachtwoord te verwijderen

Af en toe krijg ik een vraag om een wachtwoord van een Excel blad te halen. Doodsimpel met VBA. Hier een script dat ik gebruik: Sub WachtwoordCrack()     Dim a As Integer, b As Integer, c As Integer, d As Integer, _     e As Integer, f As Integer, g As Integer, h As Integer, _  I As Integer, j As Integer, k, m As Integer     Dim begin As Date, eind As Date     Dim duur As String     Dim objSheet As Worksheet     begin = TimeValue(Time)     On Error Resume Next     For Each objSheet In Application.Worksheets         For a = 65 To 66: For b = 65 To 66: For c = 65 To 66             For d = 65 To 66: For e = 65 To 66: For f = 65 To 66                 For g = 65 To 66: For h = 65 To 66: For I = 65 To 66                     For j = 65 To 66: For k = 65 To...

Excel: gegevenslabel alleen bij de laatste waarde in een grafiek

Creatief met Corona Bij het maken van een grafiek over de voortschrijdende Corona cijfers in Nederland liep ik tegen een probleem aan. Als je bij een reeks gegevens in een grafiek de gegevenslabels aan zet, krijg je die labels bij elke waarde. Ik wilde dit label alleen bij de laatste waarde tonen. Nu kun je natuurlijk alle andere gegevenslabels afzonderlijk wissen, maar dat is een hoop werk. Op zoek naar een andere manier dus. De cijfers datum aantal 1-3-2020 3 2-3-2020 8 3-3-2020 5 4-3-2020 15 5-3-2020 44 6-3-2020 46 7-3-2020 60 8-3-2020 76 9-3-2020 57 10-3-2020 61 11-3-2020 121 12-3-2020 111 13-3-2020 190 14-3-2020 155 15-3-2020 176 16-3-2020 278 17-3-2020 292 18-3-2020 250 19-3-2020 20-3-2020 21-3-2020 22-3-2020 23-3-2020 24-3-2020 25-3-2020 ...

Vrouwen van het Friese verzet. Gevecht op vele fronten.

  Al toen mijn vorige boek, de biografie van Piet Oberman zijn voltooiing naderde, rees bij mij het idee onderzoek te doen naar de bijdrage van vrouwen aan het Friese verzet. Hoe groot was hun bijdrage eigenlijk geweest? En wie waren deze vrouwen precies? Eenmaal aan de slag werden me van alle kanten namen aangereikt. Of ik aan Wieke Bosch gedacht had? Nee, nooit van gehoord zelfs. Of Bouwina Meindertsma? Ja, die naam was ik eerder tegen-gekomen. Zelf ging ik ook op onderzoek uit en zo onstond gaande-weg een lijst met tweeëndertig namen van vrouwen die in de oorlog betrokken waren bij het verzet tegen de Duitse overheerser. Voor een deel afkomstig uit Friesland, maar voor een groot deel ook uit de rest van Nederland. Uit Groningen, Utrecht en Noord- en Zuid-Holland. En zelfs een jonge Joodse vrouw uit Duitsland. Ze moesten in de Tweede Wereldoorlog het hoofd bieden aan een wrede bezetter. Maar het boek gaat niet alleen over de oorlog.  De vrouwen moesten ook nog opboksen ...