+ Reply to Thread
Results 1 to 5 of 5

If count function with dates

  1. #1
    Registered User
    Join Date
    06-29-2012
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    2

    If count function with dates

    Hi there,

    I'm having problems with the if-function in Excel 2003.

    This is the case:

    I have a sheet with dates on which assignments were executed.
    Now I want to count them by week.

    from 1-1-2012 untill 1-7-2012 -> 32 assigments were executed (so 32 different dates in column within the range 1-1-2012 / 7-2012)
    from 1-1-2012 untill 1-7-2012 -> 28 assigments were executed (so 28 different dates in column within the range 8-1-2012 /14-2012)
    etc.


    Does anyone have a clue?
    thnx
    Val.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If count function with dates

    You mean?

    =COUNTIF(A:A,">="&DATE(2012,1,1))-COUNTIF(A:A,">"&DATE(2012,1,7))

    Where column A is your column of interest.

    Note: You may have to replace commas with semi-colons for your version:

    =COUNTIF(A:A;">="&DATE(2012;1;1))-COUNTIF(A:A;">"&DATE(2012;1;7))

    You can also use a Pivot Table and group by Week...

    http://www.contextures.com/xlPivot07.html#Week
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-29-2012
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: If count function with dates

    Quote Originally Posted by NBVC View Post
    You mean?

    =COUNTIF(A:A,">="&DATE(2012,1,1))-COUNTIF(A:A,">"&DATE(2012,1,7))

    Where column A is your column of interest.

    Note: You may have to replace commas with semi-colons for your version:

    =COUNTIF(A:A;">="&DATE(2012;1;1))-COUNTIF(A:A;">"&DATE(2012;1;7))

    You can also use a Pivot Table and group by Week...

    http://www.contextures.com/xlPivot07.html#Week
    Yes mate! That's it... now I see it it makes sense to me. But honestly, I couldn't have come up with this myself :-)
    THNX !

    One final addition...
    There are 2 suppliers and I want to filter them. In Column B you'll have supplier A or supplier B.

    Tried =(COUNTIF(A:A;">="&DATE(2012;1;1))-COUNTIF(A:A;">"&DATE(2012;1;7)))&(B:B="supplierA")

    Not working :-(
    Last edited by van_vugt; 06-29-2012 at 10:08 AM.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: If count function with dates

    Try, for 2003 ...
    Please Login or Register  to view this content.
    With 2007 and above you can use COUNTIFS()
    Last edited by Marcol; 06-29-2012 at 10:06 AM. Reason: Changed comma separator to semi-colon
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If count function with dates

    sorry... didn't see your edit earlier....

+ 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