+ Reply to Thread
Results 1 to 5 of 5

SUMIFS formula with date format issues

  1. #1
    Registered User
    Join Date
    10-27-2010
    Location
    Swansea, Wales
    MS-Off Ver
    Excel 2007
    Posts
    47

    SUMIFS formula with date format issues

    Afternoon all,

    I'm a bit stuck with a SUMIFS formula. The data range I'm referencing contains numbers such as 20110131. My SUMIFS formula says if greater than 31/12/2010 and less than 30/03/2011, etc then return a total.

    The problem I have is the data range date is a number and my greater than and less than definitions are dates so the SUMIFS doesn't work.

    I'm stuck with these (i.e. the data range will always be a number and the date will always be a date) but how can I overcome this?

    I've tried adding cells next to the dates for use as references in > or < and used for 31/12/2010 =right(A1,4)&mid(A1,4,2)&left(A1,2) but that doesn't return what I want.

    Any suggestions?

    THanks!!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: SUMIFS formula with date format issues

    Try DATE(right(A1,4), mid(A1,4,2), left(A1,2))

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: SUMIFS formula with date format issues

    Or select the data - Menu Data - text to columns -Next - Next
    In the "column data format" select Date and select YMD as format then Finish

  4. #4
    Registered User
    Join Date
    10-27-2010
    Location
    Swansea, Wales
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: SUMIFS formula with date format issues

    Thanks both,

    Arthurbr, I couldn't get this to work.

    zbor that would work if I was translating the text format to a date (i.e. 20110418 to 18/04/2011) but I want to translate an actual date (18/04/2011 or 40651 displayed as a number) to 20110418.

    Any ideas?

    Thanks!

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: SUMIFS formula with date format issues

    Maybe this:

    =YEAR(A1)&TEXT(MONTH(A1), "00")&TEXT(DAY(A1), "00")

+ 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