# Percent Question

#### Spook E

##### New Member
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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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

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)

That just gave me the number 0

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

that works great Doug, thanks

Replies
2
Views
117
Replies
3
Views
369
Replies
0
Views
138
Replies
2
Views
168
Replies
3
Views
304

1,217,682
Messages
6,137,959
Members
450,101
Latest member
Mrupe86

### 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.

### Which adblocker are you using?

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

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