+ Reply to Thread
Results 1 to 7 of 7

Formula to calculate a number of students in an attendance sheet !

  1. #1
    Registered User
    Join Date
    08-16-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    4

    Formula to calculate a number of students in an attendance sheet !

    Hi there,

    I am working on an attendance sheet where the name of the students, their gender (either "G" & "B"), and their respective categories (5 different categories) are in the continuous columns. Please note that everything is in random order. Now in the next 30/32 cells the dates are written in which a teacher puts either a "P" (for present) or an "A" (for absence) or even left it blank for absence. See the image for a better understanding:

    sample.png

    Now I need to calculate "How many students were present at least one day in different categories and gender"? i.e. for an example How many boy (B) students from category 2 (CAT2) attended the school at least 1 day.
    Kindly note that we do not have to count "How many days a particular student attended the class?". That means for each student we have to search for only 1 "P" in the date cells. I tried many things like SUMPRODUCT, COUNTIFS etc. But nothing gave me the desired result.
    Please help !
    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to calculate a number of students in an attendance sheet !

    I can't open PNG, and probably other forummember don't want PNG, since we can't work in it.

    You get better help if you add a small excel file on the forum, without confidential information.

    Please also add the expected result manualy in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    08-16-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    4

    Re: Formula to calculate a number of students in an attendance sheet !

    Thank you for the response and sorry for the inconvenience. I am very new to this forum.
    I am attaching an Excel demo file. In the 2nd sheet, I wrote the expected outcomes whereas the 1st sheet have the actual data.
    Thank you !
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to calculate a number of students in an attendance sheet !

    With a pivot table.

    See the attached file.

  5. #5
    Registered User
    Join Date
    08-16-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    4

    Re: Formula to calculate a number of students in an attendance sheet !

    Thank you @oeldere. Though I did not use Pivot table and did some COUNTIFS with the column you added to get the desired result

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Formula to calculate a number of students in an attendance sheet !

    =SUMPRODUCT((MMULT(('Attendance sheet'!$F$6:$AJ$28="P")*1,ROW(INDIRECT("A1:"&ADDRESS(COLUMNS('Attendance sheet'!$F$6:$AJ$28),1))))>0)*('Attendance sheet'!D$6:D$28="B"))
    Try this formula for more details see the attached file
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Registered User
    Join Date
    08-16-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    4

    Re: Formula to calculate a number of students in an attendance sheet !

    Thank you Shiva for your response. Though I could not get it completely (I am completely new for all this). Column are hidden or missing (11-12, 14-15, 17-19) and there are only one gender "G". Any ways, my problem has been solved.
    Thanks again for your help. I appreciate it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Attendance Sheet: Formula Help needed.
    By viperzero in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-04-2015, 08:31 AM
  2. Replies: 7
    Last Post: 02-11-2015, 11:23 AM
  3. Replies: 3
    Last Post: 03-05-2013, 11:42 AM
  4. Replies: 0
    Last Post: 06-23-2012, 01:38 AM
  5. Excel 2007 : Students attendance sheet
    By hemagoutam in forum Excel General
    Replies: 4
    Last Post: 04-18-2012, 04:40 AM
  6. Help in tracking my students' attendance
    By changokid in forum Excel General
    Replies: 0
    Last Post: 02-11-2005, 03:50 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1