+ Reply to Thread
Results 1 to 7 of 7

Simple COUNTIF problem

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    Uk
    MS-Off Ver
    Excel 2007
    Posts
    5

    Simple COUNTIF problem

    Hi all,

    I've been wrestling with this problem for an hour now and trawled through this forum to no avail. Basically I want to count the number of occurrences of the month and year, ie 08/2012

    I've attached the a test sheet with the problem, the formula =COUNTIF(A1:A2,"May 2012") , it works with dates that start with 01/, but not dates greater than 01 (i.e 01/05/2012 but not 02/05/2012). Any ideas? It's probably something really silly that I'm not seeing. Any advice gratefully received.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-29-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: Simple COUNTIF problem

    Hi,

    I have insterted a column and then applied Countif formula...

    See if this work else let me know

    Thanks
    Dinesh
    Attached Files Attached Files

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Simple COUNTIF problem

    Hi Keithflc

    Try the following COUNTIFS

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


    Merged Cells (They are the work of the devil!!!)

  4. #4
    Registered User
    Join Date
    01-17-2013
    Location
    Uk
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Simple COUNTIF problem

    Both of these solutions worked, thanks so much! I've no idea how Kevin's one works, but that doesn't matter.

    I'll just need to figure out which one is quicker to implement


  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Simple COUNTIF problem

    Hi Keithflc

    You do not need a helper column!
    Lots of ways to do it with COUNTIFS or SUMPRODUCT
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you put your dates in cells you can reference the in your formulas. IE: In cell F1 the start date:01/08/2012 & F2 the end date: 31/08/2012
    =COUNTIFS(A1:A2,">="&F1,A1:A2,"<="&F2)
    Last edited by Kevin UK; 01-17-2013 at 07:30 AM.

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Simple COUNTIF problem

    Hi

    I did not notice you uploaded a file. See the attached.
    Attached Files Attached Files
    Last edited by Kevin UK; 01-17-2013 at 07:37 AM.

  7. #7
    Registered User
    Join Date
    01-17-2013
    Location
    Uk
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Simple COUNTIF problem

    Thanks Kevin

+ 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