COUNTIF and COUNTA formula as a percentage

Springer_30

New Member
Joined
Oct 14, 2009
Messages
28
Good day

Have not posted here in ages but have a small problem

In the sheet below there are for example five students who have arrived either "Late" or "On Time" for classes over a period of three days

How do I calculate the percentage for each student of being "On Time" for the three days using COUNTIF and /or COUNTA?

Day 1
On Time / LateName% On Time
DavidLateDavid
JohnOn TimeJohn
SimonOn TimeSimon
MaryOn TimeMary
KateOn TimeKate
Day 2
DavidLate
JohnOn Time
SimonOn Time
MaryLate
KateOn Time
Day 3
DavidLate
JohnLate
SimonOn Time
MaryOn Time
KateLate

<tbody>
</tbody>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Firstly that isnt a great way to set out your data. You would be much better off having the headers Name, Day and On Time/Late rather than just the two headers and blocks of days. That said you can use COUNTIFS. eg:

=COUNTIFS(A:A,D2,B:B,"On Time")/COUNTIFS(A:A,D2)

Format to percentage.
 
Upvote 0
Thanks Steve, it has worked

BTW, I do fully agree that the way the data was set out isn't great at all, it was however just put together for the purpose of attaining the formula
 
Upvote 0

Forum statistics

Threads
1,215,364
Messages
6,124,510
Members
449,166
Latest member
hokjock

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