+ Reply to Thread
Results 1 to 12 of 12

Countifs includes dates in different format

  1. #1
    Registered User
    Join Date
    01-20-2013
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    24

    Question Countifs includes dates in different format

    Hi,

    I'm trying to do COUNTIFS with criteria range [long date] and criteria [short date] but its not working
    I have tried to change the date format of the [long date] to short but it is still shows the hour if I stand on the cell.

    I have tried to use * after the [short date] cell but still the function does not work.
    I manage to change the extract just the cell format using [=DATEVALUE(DAY(C2) & "/" & MONTH(C2) & "/" & YEAR(C2))] but I don't want to add more data to the DB.

    Plus I'm using this function for making count by hour graph [=SUMPRODUCT(--(HOUR(A$2:A$13)=HOUR(C2)))] how can I add this function to count only if a different =X
    so I will have graph that shows how many item there were by person X on hourly frame

    please help me finding the solution...

    Thanks!
    Last edited by mosheva; 08-06-2013 at 12:51 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Countifs includes dates in different format

    COUNTIF() and COUNTIFS() don't handle arrays, other than straight ranges.
    Try this where A1:A20 contains your mixed dates and B1 your target date in any format
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Can you adapt that to suit your needs?
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    01-20-2013
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Countifs includes dates in different format

    TNX!

    but the reason that I used CountIFS is that I have multiple criterias before the date criteria like specific person and sale time.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Countifs includes dates in different format

    So add the other criteria to the SUMPRODUCT() formula.

    Best you post a sample workbook if you are not comfortable with SUMPRODUCT()

    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

  5. #5
    Registered User
    Join Date
    01-20-2013
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Countifs includes dates in different format

    Hi,

    I have added demo version of the file

    TNX!
    Attached Files Attached Files

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Countifs includes dates in different format

    I can't see why you have dates with times in Column A and how it relates to Column B.

    I don't understand what you need in Column H can you try to explain a little better?
    Does this relate to Column A or B ?

    See if this workbook helps
    Select from the drop-downs in L1 & M2
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-20-2013
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Countifs includes dates in different format

    Hi,

    I manage to work with the SUMPRODUCT that you used in the attached excel
    but I did not manage to work with it on the hours table, I have tried to change the INT to HOUR but still no good

    any ideas?

  8. #8
    Registered User
    Join Date
    01-20-2013
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Countifs includes dates in different format

    Hi,

    I manage to work with the SUMPRODUCT that you used in the attached excel
    but I did not manage to work with it on the hours table, I have tried to change the INT to HOUR but still no good

    any ideas?

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Countifs includes dates in different format

    INT() returns an integer, time is the decimal portion of a long date.

    If you need help with times please answer my query in post #8
    I don't understand what you need in Column H can you try to explain a little better?
    Does this relate to Column A or B ?

  10. #10
    Registered User
    Join Date
    01-20-2013
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Countifs includes dates in different format

    Hi,

    TNX! it is related to column B...

    TNX again!

  11. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Countifs includes dates in different format

    I don't see clearly what you mean by "Sum how much times sales person work on hour of day"

    If it means if a time appears in Column B against a sales person in Column E this counts as one, then COUNTIFS() will work.
    None of the criteria depends on Column A.

    I have added what I assume you mean to this workbook.
    Select from the drop-downs in the yellow cells.

    I'm at a total loss from the information so far, as to why you have "long dates" in Column A.
    Seems to me that if you were to strip the time element from this column then all your problems could be solved with COUNTIFS() and/or SUMIFS().
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    01-20-2013
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Countifs includes dates in different format

    Thanks!
    exactly what I needed.


+ 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. Need help with formula that includes dates
    By kirkts in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-27-2012, 02:51 PM
  2. [SOLVED] Format for Concatenate formula which includes single quotes
    By jacob@thepenpoint in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-04-2012, 03:32 PM
  3. [SOLVED] Counting Cells that includes exact match and also if a cell includes specific text
    By smclachlan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-19-2012, 07:42 PM
  4. How do I format to currency when number includes cents?
    By INEEDHELP in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2006, 11:36 AM

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