+ Reply to Thread
Results 1 to 4 of 4

Count data based on color of cell with criteria

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post Count data based on color of cell with criteria

    hi,
    i have data in sheet "ENTRY" range B10:B1000 and yellow color in range K10:K1000

    i want to count yellow color in sheet "SUMALL" in range F11:F1000 According to range E11:E1000

    I Added a sample workbook and some demo data

    oops! uploading file is not working at my side
    so uploading sample another site, if this is not in rule to upload sample on another site please pardon me
    thank you


    https://volafile.org/get/dmFWBjsTE44u/sample.xlsx
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    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: Count data based on color of cell with criteria

    One way:

    Please Login or Register  to view this content.
    =SUMPRODUCT(('OL BC'!$B$10:$B$22=SUMALL!E11)*testColour('OL BC'!$K$10:$K$22,SUMALL!$F$10))

    using F10 as the source of the reference color.

    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
    [B][I]


    If it's too slow, delete "Application.volatile" and remember to recalculate (f9) after any shadings are changed.
    Attached Files Attached Files
    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

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Count data based on color of cell with criteria

    Yes,
    it worked as i need

    thank you dear Forum Guru

  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: Count data based on color of cell with criteria

    You're welcome and thanks for the Rep.

+ 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] changing cell color based on criteria
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-05-2017, 10:44 PM
  2. Count based on color of cell
    By onelovesojah in forum Excel General
    Replies: 5
    Last Post: 01-12-2015, 03:09 PM
  3. Count cells based on cell color
    By vamshi57 in forum Excel General
    Replies: 3
    Last Post: 04-14-2014, 02:11 AM
  4. [SOLVED] Color cell based on date criteria
    By RonNCmale in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2012, 02:26 AM
  5. Count based on cell fill color
    By hmesler in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-29-2011, 01:01 PM
  6. Changing cell color based on count
    By mossman65 in forum Excel General
    Replies: 1
    Last Post: 01-28-2011, 09:37 PM
  7. Color Fill Cell Based on Criteria
    By frankee_gee in forum Excel General
    Replies: 3
    Last Post: 04-24-2008, 02:55 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