+ Reply to Thread
Results 1 to 14 of 14

Trying to calculate the number of entries between 2 columns on an attendance table

  1. #1
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    12

    Trying to calculate the number of entries between 2 columns on an attendance table

    Hi all,

    I have a workbook for attendances to a martial arts club that I wish to calculate a few different aspects in order to make the day to day input simpler for the club admin (voluntary role so I don't want her to spend too long doing diary entries/weekly checks etc)

    My problem:
    I am trying to calculate the number of attendances a student has between grading's. i.e. if a student last graded 01/01/17 and there are 2 sessions per week (not all sessions would be attended), and as of todays date (06/03/17), how many sessions they have been attended.

    My way of thinking was if the grading day was session 3 and todays day was session 15, a formula would search between session 3 and 15 to count the number of sessions attended. I'm hoping someone would be able to assist me with calculating a formula (or a way) to ensure I can do this automatically. (any other recommendations for the overall workbook working would be appreciated too).

    I have attached the whole workbook, its not pretty because I wanted the functionality working first. The Attendance worksheet is the main table with a sample attendance record, The Gradings worksheet is where the sessions attended is being calculated.

    Please and thank you in advance
    Kind Regards
    Alan
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    what signifies attendance at a session?

  3. #3
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    Hi philaugust2004, thank you for your response.

    An attendance is defined by an E (no need to pay), P (paid) or U (unpaid), I can remove the C option, making it any data within the table if that makes it easier.
    The sample data is the attendance since thurs 23/02 (session 16) to today Mon 06/03 (session 19).

    Kind regards
    Alan

  4. #4
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    I have a formula but it's HUGE and I am sure it is way over the top and someone far more talented than me can find a solution with a short formula

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    Quote Originally Posted by philaugust2004 View Post
    I have a formula but it's HUGE and I am sure it is way over the top and someone far more talented than me can find a solution with a short formula
    Lets see it? maybe thats what it needs to be, or it may get someone else thinking for something better?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    Could you give a few sample answers, just so we know what you want?

    Im thinking that to start, a formula like this will give you the number for the "last renewal" date...
    Budo F9=IFERROR(INDEX(Attendance!$C$9:$AA$9,,MATCH('Budo Passes'!C9,Attendance!$C$8:$AA$8)),"")
    copied down

  7. #7
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    =IFERROR(COUNTIF(INDIRECT("Attendance!"&VLOOKUP(MATCH(E10,Attendance!$A$8:$AA$8,0),$N$7:$O$35,2,0)&MATCH(B10,Attendance!$B$1:$B$38,0)&":"&CELL("address",AA10)), "E")+COUNTIF(INDIRECT("Attendance!$"&VLOOKUP(MATCH(E10,Attendance!$A$8:$AA$8,0),$N$7:$O$35,2,0)&MATCH(B10,Attendance!$B$1:$B$38,0)&":"&CELL("address",AA10)), "P")+COUNTIF(INDIRECT("Attendance!$"&VLOOKUP(MATCH(E10,Attendance!$A$8:$AA$8,0),$N$7:$O$35,2,0)&MATCH(B10,Attendance!$B$1:$B$38,0)&":"&CELL("address",AA10)), "U"),"")

    put in I10 in gradings and copy down
    Pretty sure someone can do one many times shorter!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    yes, that is quite a mouthful, but it may inspire others to work on it

  9. #9
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    12
    An example would be. Gary f, Last graded in session 1, today is session 15 with attendance on 3 occasions. Therefore count all filled in columns for gary f between sessions 1 and 15.
    i would then be able to workout how many sessions still remain before he is eligble to grade again.

    Quote Originally Posted by FDibbins View Post
    Could you give a few sample answers, just so we know what you want?

    Im thinking that to start, a formula like this will give you the number for the "last renewal" date...
    Budo F9=IFERROR(INDEX(Attendance!$C$9:$AA$9,,MATCH('Budo Passes'!C9,Attendance!$C$8:$AA$8)),"")
    copied down

  10. #10
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    12
    damn, i was expecting something with a few different functions but i wasnt expecting that many. Would it be any easier if i defined names, tables or something similar?
    Quote Originally Posted by philaugust2004 View Post
    =IFERROR(COUNTIF(INDIRECT("Attendance!"&VLOOKUP(MATCH(E10,Attendance!$A$8:$AA$8,0),$N$7:$O$35,2,0)&MATCH(B10,Attendance!$B$1:$B$38,0)&":"&CELL("address",AA10)), "E")+COUNTIF(INDIRECT("Attendance!$"&VLOOKUP(MATCH(E10,Attendance!$A$8:$AA$8,0),$N$7:$O$35,2,0)&MATCH(B10,Attendance!$B$1:$B$38,0)&":"&CELL("address",AA10)), "P")+COUNTIF(INDIRECT("Attendance!$"&VLOOKUP(MATCH(E10,Attendance!$A$8:$AA$8,0),$N$7:$O$35,2,0)&MATCH(B10,Attendance!$B$1:$B$38,0)&":"&CELL("address",AA10)), "U"),"")

    put in I10 in gradings and copy down
    Pretty sure someone can do one many times shorter!

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    An example would be. Gary f, Last graded in session 1, today is session 15
    Based on the data provided, Im not sure how you arrive at those dates?
    Budo C9 says gary F graded on 2/28, which is session 17, and for today's date (3/6), that session is not even shown?

  12. #12
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    Quote Originally Posted by hunterdraygon View Post
    ... if the grading day was session 3 and todays day was session 15 ...
    How would the system know that the last grading day was session 3?

    Pete

  13. #13
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    I think you could use this in cell I10 of the Gradings sheet (if that's where you want it to go - it isn't clear from your description):

    =SUM(COUNTIFS(Attendance!$C10:$AA10,{"P","U","E"},Attendance!$C$8:$AA$8,">"&E10,Attendance!$C$8:$AA$8,"<="&TODAY()))

    then copy down.

    Hope this helps.

    Pete

  14. #14
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Trying to calculate the number of entries between 2 columns on an attendance table

    ok

    I have reduced my stupidly long formula to this
    =IFERROR(SUM(COUNTIFS(INDIRECT("Attendance!"&VLOOKUP(MATCH(E10,Attendance!$A$8:$AA$8,0),$N$7:$O$35,2,0)&MATCH(B10,Attendance!$B$1:$B$38,0)&":"&CELL("address",AA10)),{"P","U","E"})),"")

    You will still need a lookup table at n7:035bin grading sheet but this is just the numbrrs 1-27 in N and column letters in O (A,B,C etc to AA)

    Formula looks at date of last grading from grading sheet and then counts sessions since that date where the student has attended.
    Last edited by philaugust2004; 03-06-2017 at 06:45 PM.

+ 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. Replies: 2
    Last Post: 08-23-2016, 03:39 PM
  2. Replies: 15
    Last Post: 05-26-2016, 11:52 PM
  3. Format table with variable number of entries
    By ccarvalho in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2016, 05:00 AM
  4. Create table based on number of entries
    By anagouveia in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-23-2015, 09:00 AM
  5. [SOLVED] Formula to calculate a number of students in an attendance sheet !
    By ajsu in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-18-2015, 09:26 AM
  6. Auto calculate table entries from multple inputs
    By FinanceGuy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-01-2010, 04:22 AM
  7. [SOLVED] How can I use dcount to total the number of columns with entries?
    By GDannyboy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2006, 09:30 PM

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