+ Reply to Thread
Results 1 to 4 of 4

COUNTIFS Using Date Text as Variable

  1. #1
    Registered User
    Join Date
    06-21-2011
    Location
    Belize City, Belize
    MS-Off Ver
    Excel 2007
    Posts
    20

    COUNTIFS Using Date Text as Variable

    Hi

    I have attached a sample spreadsheet which includes a list of individuals with different fields. As an example, I want to do a count of all the males who have a "New or Existing" status of "E" and who have a Join Date of "Mar-2011".

    However, I want the count to change based on the date that is enetered in another cell. So if I put "Apr-2011" in one cell, the count will change by matching the table's "Join Date" with the date I put in the cell.

    This is what I have so far, but the formula is not being accepted.

    COUNTIFS(SampleData[***],"M",SampleData[New or Existing (N/E)],"N",TEXT(SampleData[Join Date],"MMM-YYYY"),TEXT(Q4,"MMM-YYYY"))

    Any help would be greatly appreciated.

    Thanks.

    ltsolis
    Attached Files Attached Files
    Last edited by ltsolis; 09-09-2011 at 12:32 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: COUNTIFS Using Date Text as Variable

    You can't modify a range in COUNTIFS function with another function (that makes a range into an array which COUNTIFS can't hanfdle), so you can't use TEXT function on one of the columns.....

    ...better to add another criteria, so assuming Q4 is 1st of the month then you can use this version

    =COUNTIFS(SampleData[***],"M",SampleData[New or Existing
    (N/E)],"N",SampleData[Join Date],">="&Q4,SampleData[Join Date],"<="&EOMONTH(Q4,0))
    Audere est facere

  3. #3
    Registered User
    Join Date
    06-21-2011
    Location
    Belize City, Belize
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: COUNTIFS Using Date Text as Variable

    Thanks.

    I will give it a try and let you know how it goes. Originally, I had created a separate column and obtained the month number using =MONTH() and used that in the criteria, but I realized that when I go into a different year (say 2012), that may not give me the results I want.

  4. #4
    Registered User
    Join Date
    06-21-2011
    Location
    Belize City, Belize
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: COUNTIFS Using Date Text as Variable

    That worked very well...thank you very much.

    I have another question but I think I'll ask in a different thread because it's a different one.

    ltsolis

+ 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