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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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