Percent Question

Spook E

New Member
Joined
Aug 15, 2006
Messages
22
If i have a range of data like:

A B A B B B A C C A

How do i count the number of 'A's in the range and show it as a percentage of the total range i.e:

4 'A's out of 10 = 40%

Thanks
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Derek

Well-known Member
Joined
Feb 16, 2002
Messages
1,592
Hi there

Assuming your data is in A1 try this formula:

=(LEN(A1)-LEN(SUBSTITUTE(A1,"A","")))/(LEN(SUBSTITUTE(A1," ","")))

cell with formula formatted for percentage

regards
Derek
 

Doug.T

Board Regular
Joined
Sep 19, 2006
Messages
80
If your data is in a range of cells (ie: A1 to A10) then you could use this approach:

=COUNTIF(A1:A10,"A")/COUNTA(A1:A10)
 

Spook E

New Member
Joined
Aug 15, 2006
Messages
22
That just gave me the number 0

The range is C8:V8 and i would like the result to be located in AG8

Thanks for the reply!
 

Forum statistics

Threads
1,141,224
Messages
5,705,122
Members
421,378
Latest member
CarlosDuran

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
Top