# Excel 2010 creating a chart/graph for YES/NO answer

### Question

• Hi,

Is there a 'simple' way to create a pie chart for a YES/No column?

Meaning, I know the =COUNTIF(A2,"Yes") and =COUNTIF(A2,"No") type thing but that creates two columns.

Is there a way to nest the yes/no into one column to make a pie chart?

For example an Expense report, you have a column of the department, and then a column with the amounts and then a column with approvals, etc.  I want the department name (col a) and a pie chart showing the amounts of yes vs no's in say column b.

Column A has the Name of Topic (ie: marketing, Column B is sales, Column C is support) and column d has approved (yes/no)

OR

Column A has all three departments (marketing, sales, support) and column B has Yes/No.

In Excel 2003 you had a Wizard asking what you wanted to do, can't find it in Excel 2010.

Make a pie chart consisting of YES/NO. with the slices showing the departments.

cheers
Tom

Tuesday, November 16, 2010 6:39 PM

• Hi

You can combine the two with =countif(a2,"Yes")+countif(a2,"no"), or =sum(countif(a2,"Yes"),countif(a2,"No").  The answer will be 1 if a2 is yes or no.

What else could in A2? =Counta(A2) would give the same answer if the only other entry was nothing or a number.

If you end up with 1 for each department you'll have a pie with equal segments for each department, or have I completely miss understood.

G North MMI
Tuesday, November 16, 2010 7:10 PM
• The =countif(a2,"Yes")+countif(a2,"no"),  gives all "1" as the answer, will try another way.

Figured it out.  Just use the =countif(a2,"yes") by itself.  If there is a NO, it will show 0 (zero) which is what I want.

THanks@!

Tuesday, November 16, 2010 7:49 PM

### All replies

• Hi

You can combine the two with =countif(a2,"Yes")+countif(a2,"no"), or =sum(countif(a2,"Yes"),countif(a2,"No").  The answer will be 1 if a2 is yes or no.

What else could in A2? =Counta(A2) would give the same answer if the only other entry was nothing or a number.

If you end up with 1 for each department you'll have a pie with equal segments for each department, or have I completely miss understood.

G North MMI
Tuesday, November 16, 2010 7:10 PM
• Hi G.

No, I think you answered it, will try.  Was hoping a simplier way for the admin staff not to remember doing functions.  Meaning in 2003, they had a wizard to walk them through.

Is the wizard gone in Excel 2010 for creating charts?  I was looking and mabye can't see the forest for the trees.

Tuesday, November 16, 2010 7:40 PM
• The =countif(a2,"Yes")+countif(a2,"no"),  gives all "1" as the answer, will try another way.

Figured it out.  Just use the =countif(a2,"yes") by itself.  If there is a NO, it will show 0 (zero) which is what I want.

THanks@!

Tuesday, November 16, 2010 7:49 PM