Free Microsoft Excel 2013 Quick Reference

Pie Chart "Gas Gauge"

I hope this is a simple question. How do I get a pie chart to begin at 100%
availability and decrease based on a sum at the end of a column of values? If
I can color it, ie. 100%-75% green 74%-50% yellow, and 49% or less as red,
that would be even better. The only thing I can relate it to is an
automobile's gas gauge.

Post your answer or comment

comments powered by Disqus
I'm using Excel 2004 for Mac. My data is an expense spreadsheet with columns for category and payment. The category column has a drop-down list. The spreadsheet was made according to the directions here:

Sample Data

Category / Outgoing
Household / 5.00
Household / 7.00
Dining Out / 10.00
Household / 3.00
Gas / 30.00

I am trying to make a pie chart with all of the categories. In this case, that would mean one slice of $15.00 for Household, one slice of $10.00 for Dining Out, and one slice of $30.00 for Gas. Instead, I'm getting a pie chart with 5 slices, one for each line of data entered.

When I go to Pie Chart, I have been selecting the two columns (Category & Outgoing) under Data Range. I have also tried to use the Series tab, with Outgoing in "Values" and Category under "Category Labels".

I appreciate any help! Please let me know if I can clarify anything. Thank you!


My issue with my pie chart is that I can’t seem to stop the chart from reporting a category with no value. I am using it for a money spending tracker. I have my finances going to different categories. The (Series) data for the pie chart is a list of spending categories. I.E. Bills, Groceries, Gas, etc… In the (Category) side is the dollar amount for the above series. I have the series as a “SUMIF” logic. I.E. when I enter a withdraw for a groceries, I state on my checking register that this withdraw is the category “Groceries” in a specific column. The formula finds the key word “Groceries” and gets the value from the amount withdrew column on my checking register. It than will add up all withdraws for the entire month for groceries in one cell.

The problem I am having, is the categories that I haven’t spend money in. It shows a $0.00 reference on the pie chart. With about 30 categories, there isn’t a lot of room in the chart for something without a value, and just looks sloppy. If I clear the formula from that specific cell that has a 0 value reporting to the chart, it than removes it from the chart. It than looks as I wanted it, but it won’t be able to update once I do spend for that category. There is no longer the SUMIF logic. If there is a formula in the cell, it shows it on the chart. Regardless if it has money withdrew from that category or not.

I tried formatting the cells as ##??. The categories that don’t have any money spent, show as blank, but it still shows a reference to it on the pie chart.

I hope I made myself clear, and I’m not too confusing. I am out to sea currently and somewhat limited to files that I can attach. If anyone would need a sample ok the work, I could see if I could set it up.

Sorry for the long read!

I just cant believe this isn't possible, but how do you create share change (or percent change) in a pie chart without having to type in the numbers each time?

I am noticing that I can't create a formula as a label and I don't want to "hide" the calculation in a cell somewhere (trying to make this automated so that the report doesn't get messed up for future users).

so for instance (label example for pie chart):
Pens: 50% Shr (+1.2%)

In the above example, Pen's would have a 50% slice of the pie, and have gain 1.2% over the previous year.

Thank you so much for your help!!


I have a pie chart, and the source data for the pie chart is a pivot table that I have created. However, there are several fields in my pivot table table, and I can only produce a pie chart that reflects the very first field in the table. I know pie charts can only use one field, but I need to make a separate pie chart for each field. No matter how I try and change the data source, I can only ever get a pie chart that uses thew first field in the pivot table.

Is there a way with VBA to create separate charts from the pivot table?

Many thanks,


My test data is as below..
Instrument_manufacturer Pass Fail Total 1 1 QIAGEN QIAcube 12 2 14 Qiagen 13 1 14 Roche MagNA Pure Compact 10 3 13 Roche MagNA Pure LC 2.0 13 11 24 bioMérieux NucliSENS® 9 1 10 Total 58 18 76
I want to have a pie chart with Instrument and total. With in each Total section, I want to shade the failed area. Is this possible?


I am setting up a commercial dashboard for my company.

In a specific section I show the market shares in every country, with a pie chart.
Through a drop down menu, people select the country and the series value on which the chart is build change accordingly. Only problem is that now the colours depend on the position (rows) of the market player. What I would like to do is to setup up specific colours depending on the market player (field entry) and not the position (row). Is it possible to do it with a macro?What would be the code?

The market players to whom i want to assign fixed colours are: HEINEKEN NV, CARLSBERG, AB InBev, SAB Miller. The series name is "Competitors".

Please let me know and thanks in advance for your help.



I have pie charts with many wedges. I prefer to delete the legend and have the category name and value as labels with leaders. Because there are so many labels however, the text is all scrunched together in the little bit of space available for text, and many of the leaders do not show.

Is there any way to make the pie graphic smaller so that I will have more room for my labels? I am using Excel 2007, and when I try to drag and resize the pie, it simply moves whatever wedge I am on to the middle of the graphic.


UPDATE: I figured out how to make the pie smaller, but my labels will only move to fixed positions, and if I move a label to the wrong position, all of the labels move and create a big mess. So now my question is, is there any way that I can move my labels around to any position I want without affecting the other labels?


I have an exploding pie chart in 3-D (Layout 2 - with percentages shown) for the following data

|_____| 1 |1T | 2 |2T | 3 | 3T | 4 |
|Hrithik| 98 | 80| 60| 93| 87| 92 | 99|

In the exploding pie chart , I have an individual piece of pie representing each RANK (1,1T,2,2T....).

I want to combine the pieces in pairs: (1,1T) (2,2T) (3,3T) (4)
The chart should also show the break up perecentages within pairs.

any pointers?


I have managed to find a macro that allows me to create a bar chart for each row of data and put them all into a seperate sheet.

However, I need to modify it so that it will make pie-charts for me and not use any of the fields with 0's and labels the charts. Can someone please help?

This is the original code and I have attached the spreadsheet if that helps!

    Dim rCat As Range 
    Dim rVal As Range 
    Dim rUsed As Range 
    Dim iRow As Long 
    Dim cht As Chart 
    Set rUsed = ActiveSheet.UsedRange 
    Set rCat = rUsed.Rows(1) 
    For iRow = 2 To rUsed.Rows.Count 
        Set rVal = rUsed.Rows(iRow) 
        Set cht = Charts.Add 
        cht.Name = rVal.Cells(1, 1) 
        With cht 
            .SetSourceData Source:=Union(rCat, rVal) 
            .HasTitle = False 
            .HasTitle = True 
            With .ChartTitle 
                .Text = rVal.Cells(1, 1) 
                ActiveChart.Axes(xlValue).MajorUnit = 1 
            End With 
        End With 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


I have a VB program that sets a pie chart colour automatically for each section depending on the data available. I use RGB Values.

Charts("EPE Wheel").SeriesCollection(1).Points(pnt).Interior.Color = RGB(c1, c2, c3)

What i would like to do is set the section to not be filled at all (fill = none) when the RGB value is 0. What is the VB code to set a segment to not be filled?

Thanks very much

Hello all,
I think I've come across a bug in Excel's pie chart function and I'm wondering if there's any way around it.

(I am writing a subroutine that generates pie charts automatically from data in a sheet.)

When you have just one category plotted in a pie chart (so that the section is 100%, takes up the whole pie chart), the labels 'category name' and 'series name' get switched around. What I mean is that if you have 'category name' checked, it will display a '1' on the chart. If you have 'series name' checked, it will display the actual category name (a string). I also noticed that it displays '1', not 'series 1' when 'category name' is checked. This only happens when there is just one category (two cells) being plotted. This also happens when plotting using the chart wizard.

Has anyone else noticed this? Is there a way to get Excel to do the right thing (other than changing my vba code to plot 'series name' instead)?

I would like to create a pie chart that pulls out two slices, but keeps them together. When I try to do this in excel, I can pull out the slices, but they remain separated.

Thanks in advance for any help


I have a matrix that has been populated in VBA and I would like to set the source data of a pie chart to be the values in the array. A simplified version is shown below:

    Dim Food(1 To 2, 1 To 2) As Variant 
    Food(1,1) = "Bread" 
    Food(1,2) = 10.56 
    Food(2,1) = "Butter" 
    Food(2,2) = 2.34 
    Sheets(1).ChartObjects("Chart 1").Chart.SetSourceData Source:=Food 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
When I run the code I get the error "Type Mismatch". The values in the first column of the matrix are strings and the values in the second column of the matrix are doubles.

I realise that I could write the matrix onto a sheet and set the source data range to be that sheet, but I would like to do it with the array if possible. What do I need to do?

Hai everyone! I have a problem with a pie chart. Lets say , I have a sheet called Sheet1 where :
1 Emp1 100
2 Emp2 200
where A and B represent column headings AND 1 and 2 depict row numbers. That is b1 has a value 100 and A1 has a value emp1.
I want a macro that:

a) Draws a pie diagram that has title "Employee Performance", has label and percent showing for each employee .

b) This pie diagram should be displayed on a user form.
c) After the form is displayed and not-yet-disposed, I want the contents of sheet 1 to be cleared, but the pie diagram should not be affected by this cleaning.

With a Pie-in-Pie chart, the result is 1 big Pie chart and a 2nd user defined pie chart I have sucessfully done this. Now I would like to know if it is possible to create another user defined pie chart from the second pie chart? What i invision is 3 pie charts for my data--1st pie chart that represents the top 10 accounts and an "other" then a 2nd pie chart that takes the "other" and breaks it down into the top 10 in that section and an "other" and then a 3rd pie chart that will displays the "other" of the 2nd pie chart.

Is this possible?

I have included a sample of the data i am charting. There are 48 items to be plotted and the Pie Chart is the chart of preference. When i chart these items using a Pie-in-Pie Chart, spliting the data at a value of $15,000, the result is a very crowded second pie chart and i am trying to better display that second pie chart. NOTE: it is crowded with Pie-in-Pie or Bar-in-Pie chart.

Thanks for your help.

Hello, you guys have been a huge help so far! I have a pie chart that shows numerical values in dollars and I'm looking for a macro that will delete the $0 data labels. I found this code from Jon Peltier (great website by the way) but I can't seem to get it to work on my pie chart. No errors, just doesn't do anything:

    Dim iPts As Integer 
    Dim nPts As Integer 
    Dim aVals As Variant 
    Dim srs As Series 
    For Each srs In ActiveChart.SeriesCollection 
        With srs 
            If .HasDataLabels Then 
                nPts = .Points.Count 
                aVals = .Values 
                For iPts = 1 To nPts 
                    If aVals(iPts) = 0 Then 
                        .Points(iPts).HasDataLabel = False 
                    End If 
            End If 
        End With 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
from here:

Is it possible to build 1 chart that holds 2 different pie charts? If possible I need to do this with VBA

The pie charts will have the same "components" the only thing that would vary is the percentage of each component (some values will be zero in one of the charts).

Thanks a lot!


I have a restriction on the size of the Pie Chart within a larger document. Sometimes, the Data Labels contain text that appears in an awkward position in the Pie Chart. For example, the value of 75% might apply to "Manufacturer Operations Overseas" and might look like this:

urer Opera
tions Over
seas 75%

The preference would be that the data label would look something like this:

Manufacturer Operations
Overseas 75%

Is there a way that I can resize the data label so the text isn't so garbled? It was not as simple as clicking on the label, grabbing the corners, and extending as I expected.

Any help will be greatly appreciated.


I have a file with some pie charts. For some reason, the size of the pie slices do not reflect the actual percentages...for example, one of the pie slices shows 20% when it should show 25%. I tried manually resizing the slices, but that causes the data to change. Any ideas as to how I can fix this? I have attached the file.

As you can see I have created a main pie chart that shows three groupings: girl's, guy's, and accessories. If I want to create "pie charts of pie charts" (the chart type) -- is there a way to have each of the three groupings have its own pie chart. Such that I could break out accessories as the % between girl's and guy's, or alternatively, the various categories of merchandise. And If I can have another two pie chart that emanates from the guy's pie chart or the girl's pie chart. These can show the ratio of tops to bottoms or again, various categories.

Is this possible? And if so, how do i set it up?

Thanks! Auto Merged Post;

Here is another example of a pie chart that could work that is also a pie in pie chart. Perhaps if I could show the big pie w/three pieces and then each of the three pieces broken up into two components... Please assist!

Please see the attached spreadsheet, I would like to create a dynamic pie chart shows the monthly strategy breakdown (one month at a time), but not showing the zero value and also a drop down box to be able to choose which month's strategy breakdown to display on the chart.


I have to creat an exploding pie chart depicting the distribution of letter grade grades. I can sort the grades but when i try to make a pie chart I get a vertical line?

How do I depict "alpha values" in a pie chart Tab 2 Column 2.

spreadsheet attached.


I'm generating a report which has a lot of Pie charts. When i generate Pie charts the data labels goes all over the places, like it overlaps on the title or it over laps on the PIE or goes out of the chart area. I want to place the datalabels without over lapping on any of the chart components next to each pie. Can anyone help me in this regards.


I'm trying to create a piechart to display the variance from project deadlines.

Red > 10 days
Yellow 5-10 days
Green < 5 days

I have the macro written and the piecharts are being created however they seem to lack functionality. I would like to be able to click on a segment of the chart and have it display the data (projects) that have that status. Any ideas on 3rd party software, JavaScript, any other methods of creating such an interactive pie chart?

No luck finding an answer? You could always try Google.