+ Reply to Thread
Results 1 to 4 of 4

Counting entries in a table which meet date criteria

  1. #1
    Registered User
    Join Date
    10-06-2003
    Location
    Ashford, Kent - Working in London
    MS-Off Ver
    Office 365
    Posts
    95

    Counting entries in a table which meet date criteria

    I’m stuck!

    I have a table with names down the left column and each working day of the year along the top row. On that table people record their working location each day, i.e. London, Birmingham, Glasgow, Holiday, Sick etc, and I need a formula that will allow me to calculate how many days in each month each person is working (so excluding holidays and sick).
    COUNTIFS seemed to be the most likely solution, but I’ve spent hours on this and just can’t get it to work.

    I’m basically looking for a formula which says “If the date in row 1 is in month 1 then count all the entries in the corresponding row where this formula is but only if their value is ‘London’, ‘Birmingham’ or ‘Glasgow’.”

    I hope I’ve explained it clearly. I can’t upload an example as that would compromise the work security policy!

    Thanks for looking. I really apprecaite any time you spend looking at this.

    Chris.
    Big Chris

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Counting entries in a table which meet date criteria

    Maybe (obviously untested)

    =SUMPRODUCT(--(MONTH(Sheet1!A$1:ZZ$1)=Sheet2!A1)*((Sheet1!A$1:ZZ$1="London")+(Sheet1!A$1:ZZ$1="Birmingham")+(Sheet1!A$1:ZZ$1="GlasgowLondon")))

    where ZZ1 is your last column (whatever column that is)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    10-06-2003
    Location
    Ashford, Kent - Working in London
    MS-Off Ver
    Office 365
    Posts
    95

    Re: Counting entries in a table which meet date criteria

    Couldn't get it to work Special-K, but then wondered if the * in the middle should have been a + and it works perfectly!

    Thank you so much. As good as I think I am getting I would never have sussed that problem.

    Cheers,

    Chris.

  4. #4
    Registered User
    Join Date
    10-06-2003
    Location
    Ashford, Kent - Working in London
    MS-Off Ver
    Office 365
    Posts
    95

    Re: Counting entries in a table which meet date criteria

    My bad! You were of course right first time Special-K! + only looked liked it worked initially. I must have had something else wrong when using the *. Your code was spot on.

    Many thanks again,

    Chris.

+ 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. Replies: 10
    Last Post: 03-04-2013, 09:02 AM
  2. Last N entries thet meet criteria
    By gunnar_ in forum Excel General
    Replies: 13
    Last Post: 04-26-2011, 12:34 PM
  3. How to count unique entries that meet two criteria
    By Gooford in forum Excel General
    Replies: 2
    Last Post: 11-23-2010, 12:13 PM
  4. Counting unique entries that meet certain criteria
    By andy_ag08 in forum Excel General
    Replies: 2
    Last Post: 10-07-2009, 09:21 AM
  5. Replies: 0
    Last Post: 08-25-2005, 03:44 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