+ Reply to Thread
Results 1 to 4 of 4

COUNTIFS using date as condition

  1. #1
    Registered User
    Join Date
    09-13-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    27

    COUNTIFS using date as condition

    Hello,

    I'm having quite a bit of trouble with this one! : I want to write a formula that checks the number of dates that fall within a month (of the same year). What I have now is in column A of sheet1 is a list of month/years from "May-11" to "May-14" (A5:A41); in sheet2 I have a bunch of entries that were entered on various dates(A1:A1100). This is the formula I have come up with, which is written in a cell in sheet1:

    Please Login or Register  to view this content.
    Here, the idea is that it looks for dates ranging from May 1 2011 (may 2011 = A5) to May 31 2011 (june 2011 = A6). However, it doesn't work!!! There seems to be a problem with the "criteria" part of it, where it doesn't seem to accept the Value function with the <>=

    How does one fix this? or is there an alternative method? thanks!

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: COUNTIFS using date as condition

    Put your arguments in quotes, and concatenate the dates:

    =COUNTIFS(Sheet2!$A$1:$A$1100,">="&A5,Sheet2!$A$1:$A$1100,"<"&A6)

    I'm not quite sure what part the VALUE function you're using is trying to do. Simple date comparison should work fine. (I guess your dates are in text?)
    Last edited by daffodil11; 10-21-2013 at 04:13 PM.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: COUNTIFS using date as condition

    It would be very helpful if we could see a sampling of your spreadsheet to do full analysis.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    09-13-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: COUNTIFS using date as condition

    You are a very beatiful and helpful flower, daffodil11. It worked perfectly!

    The "value" was there because I was trying anything to get it working

    Alan, imagine sheet1, column A like:

    May-11
    June-11
    July-11

    ...and so on til may-14. Sheet2 column A

    11-May-03
    11-May-14
    11-May-15

    ...and so on til the present day. There are many dates, some of them repeat if info was entered on the same day. More dates will be added until next year! I need to track how many have been entered in a given month, is all, and figured this would be the best method.

    Anyway, I see what you're saying about attaching a sample workbook, I'll do it next time!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Countifs with a date as a condition
    By nickmessick1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-06-2013, 07:58 AM
  2. [SOLVED] Using COUNTIFS between dates when one more condition - can they be in one formula or not?
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2012, 01:32 PM
  3. Replies: 3
    Last Post: 12-16-2011, 10:55 AM
  4. Replies: 4
    Last Post: 08-25-2010, 07:02 AM
  5. COUNTIFS with a variable condition
    By cjsec9 in forum Excel General
    Replies: 2
    Last Post: 04-01-2009, 02:51 PM

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