+ Reply to Thread
Results 1 to 5 of 5

CountCcolor and COUNTIF(S)

  1. #1
    Registered User
    Join Date
    06-24-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    CountCcolor and COUNTIF(S)

    Hi,

    I am a CountCcolour, but I need to only have it run if a range of cells equal a number. Is that possible with countif(s)?

    The example is;

    Column of week numbers
    Column of data highlighted various colours

    I want to count the colours, but only if it relates to data from a specific range.

    My CountCcolour is working fine with this; =CountCcolor('TAB1'!$P$1:$P$2000,Colours!A1)

    So I had assumed something like this might work, but it doesn't! ; =COUNTIFS('TAB1'!F1:$F$2000, "=21") =CountCcolor('TAB1'!$P$1:$P$2000,Colours!A1)

    (F being the week numbers and P being the coloured column)

    Any help out there please?

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: CountCcolor and COUNTIF(S)

    You could use this in another column of TAB1- say, column Z - copied down to match your actual entries in column P

    =CountCcolor(P1,Colours!$A$1)

    which will return 0 or 1, and then reference those cells in your formula


    =COUNTIFS('TAB1'!F:F, 21,'TAB1'!Z:Z, 1)

    Or you could modify your VBA code for CountCcolor to add in the other conditional.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    06-24-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: CountCcolor and COUNTIF(S)

    Thanks a lot, that's a really good work around.

    I would like to update if the colour is changed, but this seem to only update once when the formula is added. Is that right?

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: CountCcolor and COUNTIF(S)

    A change in color does not force a recalc - you can recalc everything using Ctrl-Shift-F9

  5. #5
    Registered User
    Join Date
    06-24-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: CountCcolor and COUNTIF(S)

    Ctrl-Alt-Shift-F9 has done the trick. Just need to train my fingers now!

    Really appreciate your help with the solution.

+ 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. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  2. [SOLVED] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  3. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  4. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  5. [SOLVED] How do I use a countif function according to two other countif fu.
    By Kirsty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-20-2006, 07:50 AM
  6. COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  7. Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 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