+ Reply to Thread
Results 1 to 8 of 8

Formula to add colored cell

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Formula to add colored cell

    Hello:

    Please refer to attached file.
    I have data in column D,G, etc which are colored as shown.
    i need a formula to add the # of colored cell in cell D24,D25,G24,G25 and so on.
    In this example, the formula shoudl give
    D24 = 1
    D25 = 2
    G24 = 1
    G25 = 0

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,006

    Re: Formula to add colored cell

    You need VBA.

    Please Login or Register  to view this content.

    in D24 put =CountColor($D$2:$D$23,$A24)

    in D25 =CountColor($D$2:$D$23,$A25)
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to add colored cell

    Hi John:

    Please refer to attached file.
    I have tried your solutions and seems not to work in my sheet.
    Please check and help me to solve.
    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Formula to add colored cell

    I don't see where you've used John's function (which won't work with cells colored by conditional formatting, BTW) in your workbook.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to add colored cell

    Helli shg & john:

    I am using CF to color the cell and you mentioned that it would not work with CF.
    Can you help me with other solution.
    Thanks

    Riz

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,006

    Re: Formula to add colored cell

    We may have to look at the codes you are using and count them. Can you post a file with these listed.

    I'm calling it a day as it is late here in UK but I'll look tomorrow: hopefully someone else will be able to help before then.

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to add colored cell

    Hello:

    I have already posted the file.
    Please download and see.
    Thanks
    Riz

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,006

    Re: Formula to add colored cell

    Put these in D41 and D42

    =SUM(COUNTIF(D$3:D$40,{"4-C","5-C","6-C"}))

    =SUM(COUNTIF(D$3:D$40,{"10-2","9-4-C","10-4"}))

    Copy to G , J etc

+ 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. Formula or VBA to count the colored Cell
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2014, 09:40 AM
  2. Is there a formula to filter for more than one colored cell?
    By jam320 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-01-2014, 02:27 PM
  3. Replies: 1
    Last Post: 11-09-2013, 02:43 AM
  4. Can you provide a conditional formula with colored cell change
    By DannyCog in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-01-2011, 11:56 AM
  5. If Text is colored, is there a formula
    By mlevy4 in forum Excel General
    Replies: 4
    Last Post: 10-31-2007, 06:50 PM
  6. What formula can I use to sum only certain colored cells in an exc
    By Favi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-06-2006, 09:30 PM
  7. writing a formula for a colored value
    By aaronwexler in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 09-01-2005, 11:05 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