+ Reply to Thread
Results 1 to 17 of 17

Formula to count number of 3's and 4's that appear in several different cells.

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    Maine
    MS-Off Ver
    Excel 2003
    Posts
    19

    Formula to count number of 3's and 4's that appear in several different cells.

    Basically I have a column that lists scores for students on their pre-assessment and right underneath it, their post assessment.

    At the bottom of this column I have a cell that I am trying to use to calculate all the 3's and/or 4's that were earned for their pre-assessment. I have another cell that is supposed to count all their 3's and/or 4's for their post assessment.


    Screen Shot 2016-10-05 at 9.48.48 AM.png

    1) The issue I am running into is that my countif formula only seems to be able to look for one number, not two no matter what I do.

    2) Also, the cells I am looking at are not all clustered together so I have to make many formulas for each individual cell. It seems like there must be an easier way to do this.

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

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    Many members are unable to see images in the *.png format due to forum compatibility issues with some browsers.

    If you need to post an image post it in the *.jpg format.

    Even better than posting images... post a SMALL sample file. That way we can test solutions directly in the file with the relevant data.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    This will count the number of 3s in a single cell. However, |I'm really not sure wht your full requirement is. Can you explain again and let us see a worksheet, not a picture of one...

    Will you please attach a sample Excel workbook? Please don't attach a picture of one.

    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 information is removed first!!

    4. Try to avoid using merged cells. 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.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    I forgot to add the formula....

    =LEN(A1)-LEN(SUBSTITUTE(A1,"3",""))

  5. #5
    Registered User
    Join Date
    11-21-2012
    Location
    Maine
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    https://docs.google.com/spreadsheets...it?usp=sharing

    Here is a link to a copy of the spreadsheet.

    I am looking to have cell C64 tally up any cell in column C that has a pre-assessment score of a 3 or 4.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    I can't get the damn thing downloaded. Use this formula:

    SUMPRODUCT(LEN(A1:A5)-LEN(SUBSTITUTE(A1:A5,{"3","4"},"")))

    change A1:A5 to suit your needs.

  7. #7
    Registered User
    Join Date
    11-21-2012
    Location
    Maine
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    It isn't a download. THat is a google spreadsheet. Click the link and edit it online.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    Did you try my formula on your own sheet?

  9. #9
    Registered User
    Join Date
    11-21-2012
    Location
    Maine
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    Not yet. I have never used that formula but it looks like is uses a range.

    I am trying to culminate information from cells that are not in a range. It would be like cells C4, C7, C10 etc
    for example.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    What is in the cells in between? If they are empty... it'll still work.

  11. #11
    Registered User
    Join Date
    11-21-2012
    Location
    Maine
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    Quote Originally Posted by Glenn Kennedy View Post
    What is in the cells in between? If they are empty... it'll still work.

    Pre-assessment score
    Post Assessment Score
    Empty Black Cell

    Repeat.

    So it won't work

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    Im away from my pc. Wxactly which cells do you want "counted"?

  13. #13
    Registered User
    Join Date
    11-21-2012
    Location
    Maine
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    Any cell next to a cell that contains "pre-assessment". They are all in column C. It is like every 3rd cell.

    So you see column B:
    Pre-Assessment
    Post-Assessment
    Black Cel
    Repeats.
    Last edited by jman1115; 10-05-2016 at 12:21 PM.

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    If I understand correctly then this formula should count the 3's and 4's in cells in column C corresponding to cells in column B that display the term "Pre-Assess":
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    OK. This works for me in the Excel sheet attached:

    =SUMPRODUCT(($A$1:$A$19="a")*(LEN($B$1:$B$19)-LEN(SUBSTITUTE($B$1:$B$19,{"3","4"},""))))

    Can you adapt it for your own sheet?
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    11-21-2012
    Location
    Maine
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    THis is awesome. Thanks so much guys, both of you. I learned a couple of new formulas today that just made my life easier

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula to count number of 3's and 4's that appear in several different cells.

    Great! I'm glad to have helped! If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.
    Last edited by Glenn Kennedy; 10-05-2016 at 02:55 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: 18
    Last Post: 06-27-2016, 04:45 AM
  2. Replies: 3
    Last Post: 06-26-2015, 12:50 PM
  3. Replies: 17
    Last Post: 06-27-2014, 04:25 PM
  4. Formula to count the number of cells which contain a certain year
    By katieshields in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2013, 11:22 AM
  5. [SOLVED] need formula to count number of cells that contain any of a LARGE list of zip codes
    By Security in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-14-2012, 10:37 AM
  6. Need formula to count specific number of cells
    By FairfaxHS in forum Excel General
    Replies: 2
    Last Post: 05-18-2012, 04:10 PM
  7. count cells down with a number in formula
    By leighmills33 in forum Excel General
    Replies: 4
    Last Post: 04-30-2009, 08:11 AM

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