+ Reply to Thread
Results 1 to 7 of 7

Count unique days on condition that they are Mondays

  1. #1
    Registered User
    Join Date
    11-09-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    11

    Count unique days on condition that they are Mondays

    Hi all,

    I am dealing with an issue that has been discussed (and solved) many times on the ExcelForum. However, none of the previous solutions seem to work for me. Regardless, my problem appears quite straightforward, further adding to my frustration.

    In my spreadsheet, Column A holds a list of dates, many of which appear more than once.
    Column B holds the weekdays for the associated dates in column A, which are simply written out ("Monday", "Tuesday" etc.).
    I would like Excel to compute the number of unique dates that is also a Monday anywhere in column C.
    I am able to count the total number of unique dates with the SUM(1/COUNTIF(A...:A...;A...:A...)) function, but adding the condition that I only want those dates counted that are also a Monday is a problem. I feel like I tried everything.

    If possible, I would like to complete this step without any helper columns or pivot tables. Just a single formula would be ideal.

    Thanks in advance,

    Stijn

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count unique days on condition that they are Mondays

    See if this can helps you.

    http://www.excelforum.com/excel-gene...e-entries.html
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    09-13-2012
    Location
    Atlanta, USA
    MS-Off Ver
    Office 2003, 2010
    Posts
    230

    Re: Count unique days on condition that they are Mondays

    You could probably use COUNTIFS to apply two separate conditions to the function, but I am really not sure.

    Is manipulating your data an option, using a tool like demove duplicates, then applying the COUNTIF formula?

    =COUNTIFS(Range 1, Criteria 1, Range 2, Criteria 2)

    I am not sure I really understand exactly what you are trying to achieve. Could you post a sample of your workbook?

  4. #4
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Count unique days on condition that they are Mondays

    Hi - Welcome to the forum.

    Try this formula in column C:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This will give "True" where dates in column A are unique and are also Mondays (this overrides column B completely).

    Hope this helps.
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  5. #5
    Registered User
    Join Date
    11-09-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Count unique days on condition that they are Mondays

    @ Fotis1991:

    Thank you very much, I have no idea how this formula works but I am almost there! Right now, your solution returns 0,34 (I in fact have 34 unique Mondays in my spreadsheet) and I would like it to simply return 34 to the cell. Would you know how I could do that?

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count unique days on condition that they are Mondays

    A simple way is.

    =(Formula)*100

  7. #7
    Registered User
    Join Date
    11-09-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Count unique days on condition that they are Mondays

    @Fotis1991
    Haha, no I meant (0,34) like a one row, two column matrix. But I figured it out, thank you very much!

    Stijn


    P.S. If you or anyone else ever finds the time to explain to me how the formula actually works -- I would love to know.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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