Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to Average Instances of Alpha Characters Appearing in a Range of Cells

Posted on 2014-04-10
2
Medium Priority
?
268 Views
Last Modified: 2014-04-10
Experts...

I am trying to calculate the cumulative attendance percentage for students each week as the 12-week term progresses. A copy of the worksheet is attached for reference.

I have a spreadsheet with either an "A" or "P" in cells across a row which includes other data for a given week number. "A" is for 'absent'; "P" is for 'present' in the 'ATT' column for each week. There are 12 weekly sections to the sheet. None of the other data in the rows is either an "A" or "P", other than the data in the 'ATT' fields.  I have added a percentage column (ATT %) to hold the cumulative calculation formula of the ratio of "A"s to "P"s in each weekly section using the current week and all previous weeks to-date. (For Week 3, for instance, the calculation would include the ratio of "A"s to "P"s for Weeks 1, 2, and  3.)

See the attached sheet for details.

The idea is to capture the percentage of "P"s to "A"s for each week as each week progresses. The calculation for Week 1 is simple and is already done (Column F). What is more complex is how to do this average for Weeks 2 through 12 so that it is cumulative through the current week to-date. The result would go in the 'ATT %' cell for each week, starting with cell U3 for Week 2, then cell AJ3 for Week 2, AY3 for Week 3, etc. across the sheet through Week 12 for each 'ATT %' column in the row.  

As you can see, I have conditionally formatted cell F3 so that it is green if the attendance percentage is 95% or above. I can take care of doing the conditional formats for the other 'ATT %' cells so they shade the way I want them to, so that is not a problem.

What is the formula I could place in the "ATT %" cell for each week to calculate this cumulative percentage based upon whether an "A" or "P" appears in the current week and previous weeks to-date in the "ATT" column for each week? For instance, say, in Week 8, the calculation would be based upon the ratio of total "P"s to total "A"s cumulatively for Weeks 1 through 8 and would appear in the "ATT %" cell in Week 8. This formula will be replicated down each "ATT %" column through row 29 to get the average for each student in the course.

Thanks!
Class-Attendance-and-Participati.xlsx
0
Comment
Question by:Glenn Stearns
2 Comments
 
LVL 53

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 39992083
Hi,

In Cell U3 place this formula

=COUNTIFS($E$2:T$2,"ATT",$E3:T3,"P")/COUNTIFS($E$2:T2,"ATT")*100

Open in new window


Regards
Class-Attendance-and-Participati.xlsx
0
 

Author Closing Comment

by:Glenn Stearns
ID: 39992182
That worked perfectly for all weeks! Thanks!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question