+ Reply to Thread
Results 1 to 28 of 28

Formula that counts how many students had a certain type of meeting

  1. #1
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Formula that counts how many students had a certain type of meeting

    Hello,

    I am currently using the following formula to calculate how many students had a certain type of meeting, it works fine unless you have blank cells where a students name has not been entered. I was wondering if there was a way to adapt the code so it skips blank cells? In my document I have 2 unique student names that have had the meeting type but the formula is only stating one due to the blanks as far as I can see.

    Please Login or Register  to view this content.
    I hope someone can help!

    Thanks

    Jamidd

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula that counts how many students had a certain type of meeting

    Hi
    Without an exemplary file I think it can be
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Hi Thank you for your response.

    This unfortunately just returns VALUE for some reason. The student names are in Column b and the meeting types is in Column D the meeting type that it is looking for is in the Locked worksheet cell d$5.

    I am unable to post a file due to data on the file.

    I hope this helps. Let me know if the only way is to post a file and ill try and put together an example workbook.

  4. #4
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    If its too difficult due to working out where my references go if you just put fake references for now id be able to work out where the real ones need to go

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    Add a test that the cells are not blank.

    =SUM(IF(FREQUENCY(IF(range<>"",IF...
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Thanks tony I forgot about this! I tried but I cannot seem to get it to work. This is what my formula looks like:-

    Please Login or Register  to view this content.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    You didn't include the full path:

    IF('[HDC Outreach Tracker.xlsm]Sam Vinten'!$D$7:$D$15<>"",IF...

  8. #8
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Unfortunately this has not seemed to have worked either! Ezcel states that it has found an error with the formula.

    Please Login or Register  to view this content.

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    Quote Originally Posted by Jamidd1 View Post
    =SUM(IF(FREQUENCY(IF('[HDC Outreach Tracker.xlsm]Sam Vinten'!$B$7:$B$15<>"",IF('[HDC Outreach Tracker.xlsm]Sam Vinten'!$D$7:$D$15='[HDC Outreach Tracker.xlsm]LOCKED'!$D$5,MATCH('[HDC Outreach Tracker.xlsm]Sam Vinten'!$B$7:$B$15,'[HDC Outreach Tracker.xlsm]Sam Vinten'!$B$7:$B$15,0))),ROW('[HDC Outreach Tracker.xlsm]Sam Vinten'!$B$7:$B$15)-ROW('[HDC Outreach Tracker.xlsm]Sam Vinten'!$B$7:$B$15)+1),1))
    You're missing a closing ) where highlighted.

  10. #10
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    This does not seem to work still its as if now if I have say John Smith and Tom Smith it counts that as the same person, I'm not sure if I'm correct in saying this though.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    Can you make up a SMALL sample file so we can see what the problem might be?

    We only need the data in B7:B15, D7:D15 and what's in [HDC Outreach Tracker.xlsm]LOCKED'!$D$5.

    I will not download any file larger than 15kb!

    I will not open any file that contains VBA code!

  12. #12
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    This does have VBA in it but you do not need to enable the content to see what it is.

  13. #13
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    please see attached.

    That was the smallest i can get the file :/
    Attached Files Attached Files
    Last edited by Jamidd1; 03-18-2016 at 01:16 PM.

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    Sorry, can't help.

  15. #15
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Ive taken out the VBA and the file is considerably smaller
    Last edited by Jamidd1; 03-18-2016 at 12:58 PM.

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting


  17. #17
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Sorry, i have packed it down to one file now everyone!
    Last edited by Jamidd1; 03-18-2016 at 01:03 PM.

  18. #18
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Thanks Tony for your help!

    I can assure you this file would not contain any virus!

  19. #19
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    The link doesn't work.

    You want to count the number of unique entries in B7:B15 if D7:D15 meets some condition.

    This is all the data we need to see:

    Data Range
    A
    B
    C
    D
    E
    F
    1
    ------
    ------
    ------
    ------
    ------
    ------
    2
    3
    4
    5
    6
    7
    Data
    Data
    Criteria
    8
    Data
    Data
    xxx
    9
    Data
    Data
    10
    Data
    Data
    11
    Data
    Data
    12
    Data
    Data
    13
    Data
    Data
    14
    Data
    Data
    15
    Data
    Data
    16

  20. #20
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    I hope this is what you mean!

    Sorry about that!
    Attached Files Attached Files

  21. #21
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    The problem is it seems to work on this sheet i sent you but on the one that i sent before it does not

    Edited below

    It does work but if there is a blank in say B3 is does not as seen in picture

    Untitled.png
    Last edited by Jamidd1; 03-18-2016 at 01:27 PM.

  22. #22
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    OK, I downloaded that file.

    As the criteria you have:

    1:1 Pupil Support = PS

    But the data looks like this:

    1:1 Pupil Support - PS

    So, in the criteria cell I changed = to -.

    Then, this array formula** entered in H5:

    =SUM(IF(FREQUENCY(IF(B3:B5<>"",IF(D3:D5=H3,MATCH(B3:B5,B3:B5,0))),ROW(B3:B5)-ROW(B3)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Here's your file with the formula implemented.
    Attached Files Attached Files

  23. #23
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    I thnk there may be a problem with this formula as in my origanal sheet i have next months data underneath so the ROW(B3) wont this be an issue? say i had next months data starting at B10.

  24. #24
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    You haven't mentioned that this is date conditional!

    So what is the date range and where would the dates be?

  25. #25
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Quote Originally Posted by Tony Valko View Post
    OK, I downloaded that file.

    As the criteria you have:

    1:1 Pupil Support = PS

    But the data looks like this:

    1:1 Pupil Support - PS

    So, in the criteria cell I changed = to -.

    Then, this array formula** entered in H5:

    =SUM(IF(FREQUENCY(IF(B3:B5<>"",IF(D3:D5=H3,MATCH(B3:B5,B3:B5,0))),ROW(B3:B5)-ROW(B3)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Here's your file with the formula implemented.
    I seem to have got it to count the corrent amount Thanks Tony you are great!

    But will that Row(B3) oppose a problem if there is data below the range?

  26. #26
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    No.

    You'll notice that ROW(B3) corresponds to the first row where the data is located: B3:B5.

  27. #27
    Forum Contributor
    Join Date
    02-07-2016
    Location
    England
    MS-Off Ver
    2019
    Posts
    270

    Re: Formula that counts how many students had a certain type of meeting

    Quote Originally Posted by Tony Valko View Post
    You haven't mentioned that this is date conditional!

    So what is the date range and where would the dates be?
    TBH Tony i do not think this will be an issue as long as i change the B3 bit to the correct start of the next month

  28. #28
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula that counts how many students had a certain type of meeting

    Good deal!

+ 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. [SOLVED] Formula that counts how many students had a certain type of meeting
    By Jamidd1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-13-2016, 04:03 PM
  2. [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
  3. [SOLVED] Formula for computing students grades based on some criteria
    By Absurd in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2015, 01:26 PM
  4. Formula for students' grades.
    By kara305 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-11-2015, 09:24 PM
  5. Formula for students' restult based on multiple criteria
    By msranjith in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-11-2014, 01:16 AM
  6. [SOLVED] Remove the Absent Students from the List of Failing Students
    By alyaahmed in forum Excel General
    Replies: 2
    Last Post: 03-28-2013, 01:40 PM
  7. Replies: 2
    Last Post: 02-29-2012, 08:53 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