ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula for percentages (https://www.excelbanter.com/excel-discussion-misc-queries/25679-formula-percentages.html)

Tracy

formula for percentages
 
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

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.

In article ,
"Tracy" wrote:

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????


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.

--
HTH

Bob Phillips

"Tracy" wrote in message
...
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




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

"Tracy" wrote:

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


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

"JE McGimpsey" wrote:

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.

In article ,
"Tracy" wrote:

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????




All times are GMT +1. The time now is 12:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com