+ Reply to Thread
Results 1 to 9 of 9

count if date in another cell falls in certain month and year

  1. #1
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    count if date in another cell falls in certain month and year

    I have a large spreadsheet where one column is just dates spanning over a year.
    Column A = dates (e.g. 18/5/12)
    Column B = status
    I want a formula that counts everything with a status of 'overdue' (in column B) that is in January 2012.
    I've tried sumproduct etc but it's not working as of yet.
    Thank you

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: count if date in another cell falls in certain month and year

    try something like this, adjust ranges as needed...
    =COUNTIFS(B1:B35,"overdue",A1:A35,">=1/1/12",A1:A35,"<=1/31/12")

    there are 2 variations on this that I can offer.
    - put the 2 dates in their own cells and then reference them
    - use a helper column to extract the month number, then use =COUNTIFS(B1:B1,"overdue",A1:A35,1) and again the 1 (month) can be put in it's own cell and referenced

    hope this helps?
    Last edited by FDibbins; 11-13-2012 at 01:57 AM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: count if date in another cell falls in certain month and year

    hi ea223. you can use the SUMPRODUCT as such:
    =SUMPRODUCT((TEXT(A1:A10,"mmmyy")="Jan12")*(B1:B10="Overdue"))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: count if date in another cell falls in certain month and year

    thank you! this works just fine.
    sorry fdibbins I think I was unclear but your help is useful to me in other ways!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: count if date in another cell falls in certain month and year

    glad that you got the answer you wanted. just for the record, what did I not understand about what you wanted?

  6. #6
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: count if date in another cell falls in certain month and year

    Hi fdibbins, sorry I think you actually did understand, I just misread what you wrote. It actually works just fine too, thank you. Do you by any chance know anything about how to get graphs to update automatically, I posted under the charts forum but have had no response as of yet.
    Thanks

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: count if date in another cell falls in certain month and year

    Hi. can you post the thread link here?

  8. #8
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: count if date in another cell falls in certain month and year

    yes, this is what I posted:
    Hi all.
    I have a spreadsheet that when you select a month in cell A1 (from a dropdown list) the data in the rest of the sheet will automatically update. This works fine but I also want to incorporate charts into my sheet. So what I would like is for the chart to automatically update and show information for any given month when that month is selected in cell A1. Is this possible?
    Thank you

    also the formulas in this thread work but they are making my excel crash, any ideas what's going on here?!
    thanks

  9. #9
    Forum Contributor
    Join Date
    10-18-2012
    Location
    new york
    MS-Off Ver
    Office 365
    Posts
    177

    Re: count if date in another cell falls in certain month and year


+ 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