+ Reply to Thread
Results 1 to 14 of 14

Find the average based on color filled cell

  1. #1
    Registered User
    Join Date
    02-16-2022
    Location
    Texas
    MS-Off Ver
    MS 19
    Posts
    7

    Find the average based on color filled cell

    Hello everyone,

    I wanted to know if there is a formula, or if anyone has any better suggestions on how to solve my current problem with finding the average of a range of cells, based on the color of the cell and if they value is either "Yes", "No", or "0".

    I know that I could also use the filter by function, but I would like to see if anyone knows a formula that could possibly calculate it without me having to use filter by COLOR.
    For example, when a cell that is filled with YELLOW, and has a YES, No, or 0... I can find the average of only those. Currently I have the following formula to find the average of all : =AVERAGE(IF(I3:I33="Y",1,IF(I3:I33="NO",0,"")))

    Any suggestions or if you all can think how I could go about doing this in a better way?

    Here is a snip of what I am talking about.
    Excel.png

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Find the average based on color filled cell

    Please see the yellow banner at the top of the page for attaching a sample workbook. Are the cells colored for a reason, meaning, what's the logic. Maybe that could be used in calculating the average.

  3. #3
    Registered User
    Join Date
    02-16-2022
    Location
    Texas
    MS-Off Ver
    MS 19
    Posts
    7

    Re: Find the average based on color filled cell

    They are colored because the user wanted to distinguish which students are non-English speaking, so if they are filled with yellow they are all the non-English speaking students in the classroom.


    For example: If they have a Y on column 1 they are labeled Non-English speaking. In column two based on their score, they get a YES, No, or 0.
    Last edited by paguilar1986; 02-16-2022 at 10:40 PM.

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Find the average based on color filled cell

    Can you have a column for Y/N for non-English speaking?
    Can you attach a sample as per the instructions at the top of the page?
    I'm not aware of how you'd be able to do it based on color alone with a formula or or without filtering the data.

  5. #5
    Registered User
    Join Date
    02-16-2022
    Location
    Texas
    MS-Off Ver
    MS 19
    Posts
    7

    Re: Find the average based on color filled cell

    I didn't know how to add the color yellow to the column, but Rebecca is defined as a non-English speaking student, so she has 'Y' in the second column.
    In the third column she got a 'N' because she did not pass.

    Gill is a English speaking student, so he does not have a 'Y' in the second column, so we know he is English speaking.

    Sofia is a Non-English speaking student, so she has a 'Y', so it is easier to distinguish her from the other students.
    I'd like to find the average only of the students who would be colored Yellow, which helps distinguish them as Non-English speaking.
    Rebecca Y N
    Gill N Y
    Sofia Y Y
    Emma Y Y

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Find the average based on color filled cell

    I would use AVERAGEIFS to do this. After asking twice, you still haven't attached a sample spreadsheet so it's a little difficult to produce an exact formula. Take a look at AVERAGEIFS and see if that helps.

  7. #7
    Registered User
    Join Date
    02-16-2022
    Location
    Texas
    MS-Off Ver
    MS 19
    Posts
    7

    Re: Find the average based on color filled cell

    This is what I have come up with, but my Average is not coming out correctly.
    =AVERAGE(IF(G3:G33="Y",1,IF(I3:I33="NO",0,"")))

  8. #8
    Registered User
    Join Date
    02-16-2022
    Location
    Texas
    MS-Off Ver
    MS 19
    Posts
    7

    Re: Find the average based on color filled cell

    Quote Originally Posted by Gregb11 View Post
    I would use AVERAGEIFS to do this. After asking twice, you still haven't attached a sample spreadsheet so it's a little difficult to produce an exact formula. Take a look at AVERAGEIFS and see if that helps.
    I apologize, but I am trying to add an excel sheet, but I am doing something wrong because every time I go to click on add attachment, it is blank and won't let me add an excel document.

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,416

    Re: Find the average based on color filled cell

    Quote Originally Posted by paguilar1986 View Post
    I apologize, but I am trying to add an excel sheet, but I am doing something wrong because every time I go to click on add attachment, it is blank and won't let me add an excel document.
    Please read and refer to this link, how to upload attachments
    https://www.excelforum.com/the-water...his-forum.html

    First New Thread Or Second Edit your Post
    scroll down with your mouse and You will see your left hand side Attachments word , then click manage Attachments
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  10. #10
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Find the average based on color filled cell

    In your reply, instead of clicking "Post Quick Reply", click on "Go Advanced". Then scroll down and click on the link for "Manage Attachments". Click on Choose File (and choose the file), then click on "Upload", then "Close this window", then "Submit Reply".

  11. #11
    Registered User
    Join Date
    02-16-2022
    Location
    Texas
    MS-Off Ver
    MS 19
    Posts
    7

    Re: Find the average based on color filled cell

    Hope this helps.

    =AVERAGE(IF(D3:D33="Y",1,IF(F3:F33="NO",0,"")))
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: Find the average based on color filled cell

    Please try this:

    =AVERAGE(IF(D3:D33="Y",IF(F3:F33="Y",1,IF(F3:F33="NO",0,"")),""))

  13. #13
    Registered User
    Join Date
    02-16-2022
    Location
    Texas
    MS-Off Ver
    MS 19
    Posts
    7

    Re: Find the average based on color filled cell

    PERFECT!!! Thank you so much!

  14. #14
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,416

    Re: Find the average based on color filled cell

    Cell F35 Array formula , Drag right

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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: 10
    Last Post: 08-24-2020, 12:26 AM
  2. Replies: 5
    Last Post: 03-19-2019, 11:41 AM
  3. Formulas based on if a cell is color filled with conditional formatting
    By adray13 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2016, 04:56 PM
  4. VBA code to color cell a if cell b is color filled.
    By erimhast in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2015, 08:23 PM
  5. [SOLVED] Correct syntax for function to find average based on background color of cells in range
    By moosetales in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-21-2014, 12:24 AM
  6. Replies: 12
    Last Post: 07-10-2012, 05:04 PM
  7. Replies: 5
    Last Post: 06-28-2005, 11:05 PM

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