+ Reply to Thread
Results 1 to 4 of 4

countif by conditional cormatting?

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    2

    countif by conditional cormatting?

    Hello.

    I have a staffing spreadsheet. Column A contains different job titles. Column D onwards is the date.

    Each row is the shift they are working that day, or RD for rest day. Each row then is coloured coded if that staff member is abstracted (ie on a course, A/L, secomdment).

    Is it possible to total the number of staff per job title by actual staff available? (ie not abstracted)

    I know it is possible to filter by 'formatting no fill' but ideally i want a total number row to run along side each day.

    If this makes any sense!

    Thank you

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,743

    Re: countif by conditional cormatting?

    you should be able to use sumifs or countifs

    =countifs(Criteria_range, criteria)

    so

    Job tiltle in column A
    column B reason code

    =COUNTIFS(A2:A10,"title1",B2:B10,"<>abstracted")

    OR is it just a cell colour that needs to be counted - i think that would need VBA (not my area)

  3. #3
    Registered User
    Join Date
    06-18-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: countif by conditional cormatting?

    Thank you etaf.

    The problem is I need to only count the rows where job title = xxx, which i can do, and the day column does not contain a cell with a background fill. It's the 'not counting the colour filled cells' that I am having problems with :S

    I have never used Visual Basic. I will read around to see if it is possible using VBA

  4. #4
    Registered User
    Join Date
    06-16-2013
    Location
    Yorkshire
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: countif by conditional cormatting?

    I think that would need VBA as well.

    Maybe as a potential work around, would you be able to add another column and then have a 'code' to specify whether it's a work day, rest day etc. Could be as simple as 1 = Work, 2 = Rest, 3 = Secondment, 4 = Training etc.

    Use conditional formating on THAT column instead, and you can even make it so that the number value is the same colour as the background fill so as to be 'invisible'. Then use the number/code in your countifs formula?

    So rather than counting the number of coloured cells, you're counting the number of specific values in those cells.

+ 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