+ Reply to Thread
Results 1 to 11 of 11

Counting text that appear less/more than another, using VLOOKUP

  1. #1
    Registered User
    Join Date
    10-01-2017
    Location
    Wales
    MS-Off Ver
    2017
    Posts
    62

    Counting text that appear less/more than another, using VLOOKUP

    Hello,

    I am a teacher. I am trying to write a formula which counts how many times a given grade appears in a list compared to a national expected grade.
    Grades are defined a/b/c, e.g. 4a, 4b, 4c (a being best)
    I have used a gradetable/VLOOKUP function with this.

    I am trying to calculate how many of my pupils have achieved less than the national grade, however, sometimes this national grade will need to be changed.

    So I need to look at a list/column and find out how many times pupils achieves less than a 4a, so in this case, it would count all the 4b and 4c.
    Manually by inputting a formula to count 4b and 4c this would work, but if the national grade changed to a 4b, it would mean I would have to reformulate the whole programme.


    I want excel to be able to count it by looking at one cell with the national grade it, meaning, if I changed the national grade to a 4b as mentioned above, it would then count only the 4c by itself.

    I hope someone can help
    Many thanks

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    I'm a teacher, too, and have done this myself, so will you please attach a sample Excel workbook? Nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-01-2017
    Location
    Wales
    MS-Off Ver
    2017
    Posts
    62

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    Attachment of current spreadsheet. Help needed!
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    How do values like P8 fit in? They need to be on your grade lookup table. Please provide an amended version of the file.

  5. #5
    Registered User
    Join Date
    10-01-2017
    Location
    Wales
    MS-Off Ver
    2017
    Posts
    62

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    Good question. The P values are not used any more, they are merely there for pupil records, so please ignore these values. Apologies if this caused any confusion. I'm concentrating more on Year 2 and up in all honesty, but have provided the records as it appears in real life. Thank you very much for providing your time, and I hope you can continue helping

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    Are you happy to use helper columns?

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    Consider to input the desired results so that we don't have to second-guess if what we are doing is correct or not. you may look at my signature to upload an eg that is easier to understand.

    For instance, tell us what we should expect to see in cell M39. It is for Below Expected, Y2. Y2 expectations in cell M35 shows 2C. and in Grade Table worksheet, 2C is equivalent to 16 points. So is it to find how many of them are below 16 points? There are two instances of grade 1A that is below 16 points. If so, try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    for the expected row, it should be straightforward like what you did? COUNTIF the range is EQUALS to the grade itself.

    and for Above Expected row (cell M41), change the signs for the 1st formula from lesser than to Greater than:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by benishiryo; 10-02-2017 at 01:49 AM.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  8. #8
    Registered User
    Join Date
    10-01-2017
    Location
    Wales
    MS-Off Ver
    2017
    Posts
    62

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    Excellent! The first box works great.
    How would I be able to expand on this to count the Boys only below/above and Girls only below/above like it shows in the lower part of the spreadsheet? Let's use Y2 again as an example.

    Thanks again!!

  9. #9
    Registered User
    Join Date
    10-01-2017
    Location
    Wales
    MS-Off Ver
    2017
    Posts
    62

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    Quote Originally Posted by benishiryo View Post
    Consider to input the desired results so that we don't have to second-guess if what we are doing is correct or not. you may look at my signature to upload an eg that is easier to understand.

    For instance, tell us what we should expect to see in cell M39. It is for Below Expected, Y2. Y2 expectations in cell M35 shows 2C. and in Grade Table worksheet, 2C is equivalent to 16 points. So is it to find how many of them are below 16 points? There are two instances of grade 1A that is below 16 points. If so, try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    for the expected row, it should be straightforward like what you did? COUNTIF the range is EQUALS to the grade itself.

    and for Above Expected row (cell M41), change the signs for the 1st formula from lesser than to Greater than:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Hello,
    How would I be able to expand on this to count the Boys only below/above and Girls only below/above like it shows in the lower part of the spreadsheet? Let's use Y2 again as an example.

    This would be really helpful!
    Thanks

  10. #10
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    @Jones90:
    i intentionally ignored your question on post #8 previously. we are volunteering contributors here who don't earn any income from helping you. all that we are requesting from you is some form of:
    i) appreciation and ;
    ii) effort in helping us to understand your problem better.

    you thanked me in post #8 and #9, so that's good. but how about answering post #6?

    and where is your effort shown to help us understand your problem better? i mentioned:
    Consider to input the desired results so that we don't have to second-guess if what we are doing is correct or not. you may look at my signature to upload an eg that is easier to understand.

    For instance, tell us what we should expect to see in cell M39. It is for Below Expected, Y2. Y2 expectations in cell M35 shows 2C. and in Grade Table worksheet, 2C is equivalent to 16 points. So is it to find how many of them are below 16 points?
    you knew how to quote my post, but yet did not bother to read or do them.
    1. where is the cell you are expecting your answer in? i am guessing M45 for Boys.
    2. what is the answer you are expecting? i am guessing 1. Only 1 is below 16 (Y2 expectation result). that is Pupil B.

    as you can see, i am guessing. if i guessed it right, awesome. if i guessed it wrongly, i have wasted both our time and have to spend more time answering your next question with elaboration.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    i added the part in red. change it to "G" for Girls. if i got it right, please refer to my signature on how to close the thread. if i got it wrong, i am out.

  11. #11
    Registered User
    Join Date
    10-01-2017
    Location
    Wales
    MS-Off Ver
    2017
    Posts
    62

    Re: Help for counting text that appear less/more than another, using VLOOKUP

    Thank you all for your guidance, it has worked for what I needed.
    I will close the thread.

+ 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: 11-08-2016, 09:08 AM
  2. [SOLVED] Counting the text for the given input text avoiding duplicates
    By Sekars in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-23-2016, 07:37 AM
  3. [SOLVED] Counting certain values using a vlookup.
    By CallumWebley in forum Excel General
    Replies: 3
    Last Post: 12-17-2015, 09:01 AM
  4. [SOLVED] vlookup with counting? does this need to be done with Arrays?
    By StarFyre in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-15-2014, 03:43 PM
  5. Excel 2007 : Vlookup with a counting feature?
    By budchevy in forum Excel General
    Replies: 2
    Last Post: 05-09-2011, 03:06 PM
  6. counting text in one column against a list of text in another.
    By villigeidiot in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-08-2010, 12:21 PM
  7. Counting Occurrence of Text within Text in Cells in Range.
    By Jeremy N. in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-08-2005, 01:05 AM

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