• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Totaling attendance values using a (somewhat) complex code system

posaune76

New Member
Hi.


I have an attendance chart with room for 250 students. The tutors in the hospital school program can record an encounter as a "Visit" ("V") or an hour or more tutored ("T", "TT", etc.). Sometimes these happen in combination over the course of a day, or there are multiple visits ("VT", "VV", etc.). An absence is recorded as a 0, but has a value in the code system (counts as a "T").


I need to track the total number of "V"s and "T"s for each student. These then get totaled for the whole student population. My current version (see AugAttendance[Total V] and AugAttendance[Total T]) have the attendance codes hardwired into the formulas and multiply counts of the appropriate codes by their "values."


There has to be a more graceful way. I can create a helper table (see HelperTable) that uses Index & Match functions to pull in appropriate values, but I'd need to do it for both T and then V entries. That seems cumbersome and more like a workaround than a real solution. I've been experimenting with some array formulas, but I can't quite get there.


Ideas? The file can be found at https://www.dropbox.com/s/kgsqsn20w3exh6v/Chandoo%20Example.xlsx


Please put a solution in the "Ideal Total" box, or near it if someone beats you there with something different! Thanks.
 
Posaune76


Firstly, Welcome to the Chandoo.org forums.


I don't have time tonight to have a look at this problem


You may want to see if either of the following links are applicable

http://chandoo.org/wp/2011/11/07/formula-forensics-002/

or

http://chandoo.org/wp/2012/02/01/formula-forensics-no-010/
 
Hi ,


To count the number of "T"s in a range , specifically your range C3:AG3 , use the following formula :


=SUM(LEN(AugAttendance[[1]:[31]])-LEN(SUBSTITUTE(AugAttendance[[1]:[31]],"T","")))


entered as an array formula , using CTRL SHIFT ENTER.


Narayan
 
Back
Top