Returning a percentage after a count

Yusuf

Active Member
Joined
Jun 1, 2004
Messages
337
Hi all

I'm trying to create a percentage of items by it's status at the time.

Eg;
Col A has the item Name and a Total or each item Name as in a pivot table
Col B has the item status, either Good or Bad

A2 to A9 = Apple
A10 = Apple Total
A11 to A15 = Pear

B2 to B9 = 5 Good and 3 Bad
B11 to B15 = 3 Good and 2 Bad

I need the formulas in Col C (only beside the Totals) to return a percentage of Good items according to the number of items but not count the fruit before/above and it's status.

My apologies if this is unclear but I've been thinking of better ways of writing it and hope this is the best.
 

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.
Hard to imagine why you opt for such a fragile kind of data representation...
Book2
ABCD
1ItemStatus
2AppleGood
3AppleBad
4AppleGood
5AppleGood
6AppleGood
7AppleBad
8AppleGood
9AppleBad
1080.625
11PearGood
12PearBad
13PearBad
14PearGood
15PearGood
1650.6
Sheet1


A10:

=COUNTIF(A2:A9,"Apple")

B10:

=COUNTIF(B2:B9,"Good")/A10

Formulas are similar in A16 and B16.
 
Upvote 0
My sincere apologies

In my example I stated the ranges but at the moment I've been given 12000 rows of data and the item totals are very different.

I put a formula in Col C (C2) to get a total of the items that reads;
=IF(A2=A1&" Total",countif(A1:A2,A2),"")

In C10 I get a total count of the Apples and C16 for the Pears

Is there a formula I can enter in Col D that takes this Total into account and be devided by the number of "Good"?
 
Upvote 0

Forum statistics

Threads
1,211,843
Messages
6,104,310
Members
447,901
Latest member
boy3hc2004

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