formula for percentages

T

Tracy

Hi and thanks for all the help in the past from everyone!!!

I am setting up an attendance sheet with "p" for present "a" for absent what
I want for each child is a percentage of the time in class for that month
being present there??? There are 31 days in a month (some anyways) so there
is my problem, how do I get the percentage because we have saturday & sunday
off plus some months are less than 31 days and I think you excel wizards get
what I mean hopefully I explained it right????

Thanks Tracy
 
J

JE McGimpsey

Assuming you only have p's and a's (e.g., weekends and holidays blank),
one way:

=COUNTIF(A1:A31,"p")/COUNTA(A1:A31)

formatted as a percentage.
 
B

Bob Phillips

Tracy,

If you mark p and a, could you just not use

=COUNTIF(A1:AE1,"p")/(COUNTIF(A1:AE1,"a")+COUNTIF(A1:AE1,"p"))

to get the present percentage.
 
R

roadkill

I suggest using the COUNTIF function. The range would be the column of cells
containing "a" or "p" for each day in a given month for a given student. You
can then get the percentage of in-class days using the formula

=COUNTIF(range,"p")/(COUNTIF(range,"a") + COUNTIF(range,"p"))

which gives you the number of p's over the total number of p's and a's, for
each student.

Then format the cells to be percents, of course.
- Will
 
T

Tracy

THANK YOU THANK YOU why didn't I think of that some days it just doesn't come
to me "JE yours was the one I used" but thanks to all who responded!!!!
Tracy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top