+ Reply to Thread
Results 1 to 8 of 8

Search cells based on student name, cell background colour and return a tally for colour

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    11

    Search cells based on student name, cell background colour and return a tally for colour

    At my school we're provided with national test data for entire year levels of students. Our task is to isolate some data for our own classes to hopefully improve student outcomes.

    I've attached a spreadsheet which shows the type of format we're presented with. I just don't know how to calculate tallies based on cell background colours for just my class.

    Explanation:
    I have a class summary worksheet which lists individual students in my class (generally up to 30 students). On this same class summary sheet there are some cells to show tallies of achievement levels. These show how the class performed at the national test in reading, writing and numeracy.

    The Year Level Summary worksheet has the results for the entire year level (usually over a hundred students). There are columns for student results in grade 3, 5, 7 and 9. This group only has results from grade 3 and 5.

    There are five possible cell background colours from green to red. I'd like to search through the hundred or so students, finding the students in my class and returning the tally of each colour for their reading, writing and numeracy (this would be from their grade 5 test as it was the most recent test).

    I've used the following formula to find colour tallies for the entire year level but I'm not sure how to produce a tally for just my class.

    =CountCcolor('Year Level Summary'!E9:E107,'Year Level Summary'!H113)


    The CountCcolor function (thanks to Raddini Rahayu):


    Please Login or Register  to view this content.

    I hope this makes sense and I'd really appreciate any help anyone can give.

    Thank you.
    Attached Files Attached Files
    Last edited by drof_06; 01-23-2016 at 08:35 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search cells based on student name, cell background colour and return a tally for colo

    This Macro Creates a new sheet listing just your class

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Search cells based on student name, cell background colour and return a tally for colo

    Hi, drof_06,

    according to Forum Rule 3 you would need to add code-tags to your procedure. Thanks in advance.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    04-09-2013
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    11

    Re: Search cells based on student name, cell background colour and return a tally for colo

    Thank you mehmetcik for your code. It certainly seems to be doing a good job but then I'm receiving 'Named argument not found' when it gets to the Set Z = Selection.Find line in the macro. I tried declaring Dim Z As Range but this isn't working for me either. I am very grateful for the help to get this working.

  5. #5
    Registered User
    Join Date
    04-09-2013
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    11

    Re: Search cells based on student name, cell background colour and return a tally for colo

    Hi Holger

    My apologies for not abiding by Forum Rule 3. I've since added code-tags.

    Thank you

    Rob

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search cells based on student name, cell background colour and return a tally for colo

    I don't know what workbook you tried my macro in.

    it works perfectly in your sample.

    The error would occur if none of your students names appeared in the Year Summary.

    Run Macro1 in the attached workbook.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-09-2013
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    11

    Re: Search cells based on student name, cell background colour and return a tally for colo

    Hi mehmetcik

    Thank you so much for looking at this again. I truly appreciate the time you've given to this. Even on the file you've uploaded I'm getting the error 'Named argument not found' and the debugger highlights at the same location. I'm using excel for mac, could this be the problem?

    I've definitely had some issues in the past with code in mac. Our school doesn't use Windows so if it is a mac issue it would be so good if there was another way to get mac to accept the code.

    My gratitude for your help.

    Rob

  8. #8
    Registered User
    Join Date
    04-09-2013
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    11

    Re: Search cells based on student name, cell background colour and return a tally for colo

    Hi mehmetcik

    I've been playing with the code and have worked around the 'Named argument not found' using the following:
    Please Login or Register  to view this content.
    I've now marked this thread as resolved. I truly appreciate the help given with this question.

+ 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: 01-05-2016, 06:36 PM
  2. Replies: 3
    Last Post: 02-13-2014, 06:31 AM
  3. Change colour of cells based on another cell's colour (Not value)
    By LTrain89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2013, 08:44 PM
  4. Replies: 7
    Last Post: 07-16-2012, 05:10 PM
  5. IF formula based on background cell colour
    By mr_teacher in forum Excel General
    Replies: 1
    Last Post: 11-28-2007, 10:44 AM
  6. change a cell background colour to my own RGB colour requirements
    By Stephen Doughty in forum Excel General
    Replies: 4
    Last Post: 06-16-2006, 08:15 AM
  7. Changing Background Colour Based on Cell Contents
    By Sukh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2006, 09:00 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