+ Reply to Thread
Results 1 to 10 of 10

Formulas with date values

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Formulas with date values

    I have a column with dates and text. Is it possible to count only the cells with dates?

    The formula I have is:

    =SUMPRODUCT((CSS!H9:H1000="Q2")*(CSS!I9:I1000>=DATEVALUE("01/01/2000"))) -but this formula is counting all cells with a value.

    Anything is appreciated. Thank you.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formulas with date values

    It considers TEXT strings to be greater than Dates...
    Add a criteria to test for numeric value..

    Try
    =SUMPRODUCT((CSS!H9:H1000="Q2")*(CSS!I9:I1000>=DATEVALUE("01/01/2000"))*(ISNUMBER(CSS!I9:I1000)))

  3. #3
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Formulas with date values

    Thanks. But that formula is still counting all cells with a value.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formulas with date values

    Can you post a sample book?
    Make sure there is just enough data to demonstrate your need. 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 shown, mock them up manually if necessary.

    Remember to desensitize the data.

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

    View Pic

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Formulas with date values

    Here is sample spreadsheet of what I am working on.
    Attached Files Attached Files

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formulas with date values

    Hang on, I think I see it now...
    Last edited by Jonmo1; 12-18-2014 at 04:22 PM.

  7. #7
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Formulas with date values

    Thank you. I actually just put any date. Regardless of date I put, it is still counting the cells that contain "N/A".

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formulas with date values

    OK, the first one in G6 checking for Q1..
    All the Q1's in column D have the text string "N/A" in the corresponding cell of column E.

    Text strings are considered greater than dates by the > and < operators.
    So indeed, there are 22 rows with Q1 in column D, and a value Greater than 1/1/2000 in Column E
    Adding the ISNUMBER will resolve that issue.
    =SUMPRODUCT((D5:D1000="Q1")*(E5:E1000>=DATEVALUE("01/01/2000"))*(ISNUMBER(E5:E1000)))

    Now the other 3, in G7 to G9 testing Q2 Q3 and Q4
    Those have real dates in the corresponding cells of column E
    However, ALL of those dates are indeed greater than 1/1/2000
    The dates in E are from the years 2014 or 2015
    So any date in column E is in fact greater than a date from the year 2000.

  9. #9
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Formulas with date values

    Wow thank you. That works!

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formulas with date values

    You're welcome.

+ 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] Conditional Formatting Formulas for Date, Text and Values/Numbers
    By pblobe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2013, 12:26 AM
  2. [SOLVED] VBA to enter various formulas every 10 rows and show dynamic formulas not values
    By faby2203 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2013, 07:05 AM
  3. Replies: 5
    Last Post: 05-05-2008, 02:22 PM
  4. Date values are converted to formulas
    By Al B in forum Excel General
    Replies: 1
    Last Post: 03-11-2006, 10:15 AM
  5. AdvancedFilter on cells with formulas, returning values and not formulas
    By Claus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2005, 03:05 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