+ Reply to Thread
Results 1 to 6 of 6

Counting by conditionally formatted cells

  1. #1
    Registered User
    Join Date
    01-24-2008
    Posts
    21

    Counting by conditionally formatted cells

    Hello chaps and chapesses,

    I'm using this UDF to count cells based on fill color http://www.ozgrid.com/VBA/sum-count-cells-by-color.htm

    This seems a well respected method to do so, however, i can only get it to count cells of which i have manually changed the fill color.

    Some of my cell colours are changed by Conditional Formatting. I cannot get this UDF to count these cells?

    Can anyone help me please?

    G

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    re: Counting by conditionally formatted cells

    You need to count the conditions not the colour with Conditional format, attach an example workbook.
    Last edited by royUK; 09-23-2009 at 05:10 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717

    Re: Couting by fill color, ozgrid method won't count conditionally formatted cells

    Hi,

    Where have you entered this code...
    In Sheet1, sheet2 etc module..

    Or do you clicked on Insert(Menu) --> Module and there you entered the code..

    If you entered in Sheet1 , sheet2 etc module , the function will not work..

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Couting by fill color, ozgrid method won't count conditionally formatted cells

    Quote Originally Posted by Shijesh Kumar View Post
    Hi,

    Where have you entered this code...
    In Sheet1, sheet2 etc module..

    Or do you clicked on Insert(Menu) --> Module and there you entered the code..

    If you entered in Sheet1 , sheet2 etc module , the function will not work..
    Hi Shijesh, that code that the OP has used will only count cells whose background colour is set using the Color palette, not Conditional Formatting

  5. #5
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717

    Re: Couting by fill color, ozgrid method won't count conditionally formatted cells

    Quote Originally Posted by royUK View Post
    Hi Shijesh, that code that the OP has used will only count cells whose background colour is set using the Color palette, not Conditional Formatting

    Hi Roy,

    Sorry about that .. did see CF??
    Last edited by Shijesh Kumar; 09-23-2009 at 05:35 AM.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Counting by conditionally formatted cells

    No problem, just didn't want yo to waste your time on the wrong track

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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