+ Reply to Thread
Results 1 to 9 of 9

SUMIFS to only include results with a valid date

  1. #1
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    SUMIFS to only include results with a valid date

    Good morning all,

    I am stuck on part of a SUMIFS formula where one of the criteria is that one of the ranges must contain a valid date and not / /

    =SUMIFS(Ext_price,SOCo,V2,Sale_type,"E",Type_code,$W$1,Last_sales_date,">01/01/1900") is where I think the problem is.

    See attached, in the yellow cells for where this formula is. The format of the date cannot be changed so I have to work with what I have!

    Thanks in advance

    BVG
    Attached Files Attached Files
    Last edited by Badvgood; 04-30-2021 at 05:34 AM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,743

    Re: SUMIFS to only include results with a valid date

    column S - are NOT dates , they are text and so a > date will not work

    also sales type E only has A, L Z type codes

    Also W2 is fixed with $
    so W$2 so it moves to pickup the codes
    and also V2 is not fixed - so that needs to be fixed
    $V2

    then it works OK

    I used Text to columns to change the dates to real dates

    hope this helps
    Attached Files Attached Files
    Last edited by etaf; 04-30-2021 at 04:58 AM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: SUMIFS to only include results with a valid date

    Quote Originally Posted by etaf View Post
    column S - are NOT dates , they are text and so a > date will not work

    also sales type E only has A, L Z type codes

    Also W2 is fixed with $
    so W$2 so it moves to pickup the codes
    and also V2 is not fixed - so that needs to be fixed
    $V2

    then it works OK

    I used Text to columns to change the dates to real dates

    hope this helps
    Good morning and thank you for your help (we are almost neighbours looking at your location!)

    Any idea how I can work with what I have to include or exclude the ones that have a text field that looks like a date and the ones that are / / ?

    Changing text to columns is not an option in the master file...

    Thanks BVG

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,743

    Re: SUMIFS to only include results with a valid date

    i have edited and added the file
    Does that work ?

    Ok, not sure where you are UK

    heres a line V4 etc same function , but without the date filter added, so you can compare
    Attached Files Attached Files
    Last edited by etaf; 04-30-2021 at 05:08 AM.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: SUMIFS to only include results with a valid date

    Please try
    =SUMIFS(Ext_price,SOCo,$V2,Sale_type,"E",Type_code,W$1,Last_sales_date,"> a")

    There is a space before "> a"

    or
    =SUMIFS(Ext_price,SOCo,$V2,Sale_type,"E",Type_code,W$1,Last_sales_date,"<>*/")
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: SUMIFS to only include results with a valid date

    Quote Originally Posted by etaf View Post
    i have edited and added the file
    Does that work ?

    Ok, not sure where you are UK

    heres a line V4 etc same function , but without the date filter added, so you can compare
    Hi, thank you so much for being persistent with this, I appreciate it greatly.

    Unfortunately, I can not use the Text to Columns D/M/Y function in the main sheet. Already tried this with ">01/01/1900" and hit the problem of it not being a date format.

    I have found that by using this I can see the ones that look like dates from the ones that are not dates. =(ISERR(DATEVALUE(S2))) Is there some way of including something like this in the formula?

    Very close to you in West Sussex, if you put the kettle on, it would still be hot enough by the time I got there!

    Thanks BVG

  7. #7
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: SUMIFS to only include results with a valid date

    Quote Originally Posted by Bo_Ry View Post
    Please try
    =SUMIFS(Ext_price,SOCo,$V2,Sale_type,"E",Type_code,W$1,Last_sales_date,"> a")

    There is a space before "> a"

    or
    =SUMIFS(Ext_price,SOCo,$V2,Sale_type,"E",Type_code,W$1,Last_sales_date,"<>*/")
    Perfect, thank you. Both options work perfectly in the main dataset.

    Thanks BVG
    Last edited by Badvgood; 04-30-2021 at 05:34 AM. Reason: Solved

  8. #8
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: SUMIFS to only include results with a valid date

    =SUMPRODUCT(Ext_price,(SOCo=V2)*(Sale_type="E")*(Type_code=$W$1)*(LEN(Last_sales_date)>6)) is an other option

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,743

    Re: SUMIFS to only include results with a valid date

    Very close to you in West Sussex, if you put the kettle on, it would still be hot enough by the time I got there!
    not if west wittering beach open without needing a booking

+ 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] SUMIFS formula not valid - #Value!
    By TonyFath in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 02-18-2021, 03:10 PM
  2. [SOLVED] Adding further criteria in SUMIFS formula (valid combination of two columns)
    By mp3909 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-03-2020, 03:07 AM
  3. SUMIFS include a sum in the date change
    By leovilla in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2020, 02:32 PM
  4. [SOLVED] date not include sunday,saturday and not include red date in tabel
    By alamsyah in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-19-2019, 11:55 AM
  5. sumifs include/ include criteria
    By Burt_100 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-14-2016, 07:34 AM
  6. [SOLVED] how to split date results with SUMIFS
    By graphicjunkie in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 10-03-2015, 04:18 PM
  7. SUMIFS Puzzle - Trying to avoid adding multiple SUMIFS to get valid result
    By haldavid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-09-2013, 03:42 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