+ Reply to Thread
Results 1 to 9 of 9

Count conditionally formatted cells in excel

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    2

    Count conditionally formatted cells in excel

    hi

    I have a report that conditionally formats for in stock (green) and out of stock (red) cells.

    I would like these to automatically add up, as at the moment I am filtering by colour for each store and for each colour. CountifRed doesn't work because its not classed as red.
    Please help

    thank you

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Count conditionally formatted cells in excel

    Can you post your workbook as an example?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    12-17-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Count conditionally formatted cells in excel

    Hi

    Unfortunately even the most shrunk down version of the work book it says the file is too large

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Count conditionally formatted cells in excel

    You must count using the same conditions as the formatting instead of counting the formats. For example if your conditional format puts red colour on cells greater than 10 you must count cells greater than 10 instead of counting red cells.

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Count conditionally formatted cells in excel

    Or you can format the cells with code instead of excel native conditional formatting.

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Count conditionally formatted cells in excel

    Please Login or Register  to view this content.

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Count conditionally formatted cells in excel

    @yudlugar
    With Excel 2010 you may use cl.DisplayFormat to return the formatted properties of a cell. It will fail if called from a cell as UDF but will work in a subroutine as you have written.

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Count conditionally formatted cells in excel

    @Izandol

    That would certainly be simpler! It's not there in my 2003 version though.

  9. #9
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Count conditionally formatted cells in excel

    It only became available with 2010.

+ 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] How To Count Conditionally Formatted Cells
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-16-2013, 07:51 PM
  2. UDF to Count Conditionally formatted cells by colour
    By ozzy_q in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-06-2013, 09:00 AM
  3. [SOLVED] count conditionally formatted cells
    By littlefoot in forum Excel General
    Replies: 5
    Last Post: 07-12-2012, 08:40 AM
  4. Replies: 1
    Last Post: 08-26-2011, 09:57 AM
  5. [SOLVED] Can I count conditionally formatted red cells in Excel 2000
    By ExcelUser in forum Excel General
    Replies: 1
    Last Post: 08-02-2006, 10:45 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