+ Reply to Thread
Results 1 to 5 of 5

What formula can I use to count number of items by date and another criterion?

  1. #1
    Registered User
    Join Date
    04-21-2011
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    61

    What formula can I use to count number of items by date and another criterion?

    Hello,

    Can someone help me come up with a formula for the sheet I have attached? I need to be able to enter a formula in the highlighted cells (B2:C5) that will count the number of occurrences that happen for the month and the letter for which they belong in (A-D).

    Thanks a lot,
    Arditexample.xlsx

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: What formula can I use to count number of items by date and another criterion?

    Hi look into attachment
    Attached Files Attached Files
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    04-21-2011
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: What formula can I use to count number of items by date and another criterion?

    Thanks Tom. That works good. However is there any way that formula can be altered to ignore non-date cells in the range? The reason I am asking is because my actual data has a few thousand cells that sometimes a non-date cell can sneak into the date column.

    Thanks,
    Ardit

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: What formula can I use to count number of items by date and another criterion?

    Maybe it will be good indicator for incorrect value

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: What formula can I use to count number of items by date and another criterion?

    You would be better off (considering you have a few thousand rows) with this:

    Change B1 and C1 to actual dates - Jan 1/12 and Feb 1/12 (format as mmmm) - then in B2

    =COUNTIFS($B$11:$B$18,">="&B$1,$B$11:$B$18,"<="&EOMONTH(B$1,0),$A$11:$A$18,$A2)

    copied over and down

    You should avoid SUMPRODUCT() if more efficient formula is available.
    Last edited by Cutter; 04-24-2012 at 11:08 AM.

+ 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