+ Reply to Thread
Results 1 to 5 of 5

Date function, Need MM/YY *Note:Formatting will not work as sumproduct search

  1. #1
    Registered User
    Join Date
    04-01-2013
    Location
    Cali
    MS-Off Ver
    Excel 2010
    Posts
    11

    Date function, Need MM/YY *Note:Formatting will not work as sumproduct search

    Now before you suggest formatting... Let me explain why that won't work

    I am using a sumproduct that is searching for a MM/YY, if I just do formatting the date is still in there and I need it excluded...

    So if the date is 04/12/13 I need the results returned as 04/13

    Thanks!!
    Attached Files Attached Files
    Last edited by jenncess; 04-19-2013 at 01:13 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Date function, Need MM/YY *Note:Formatting will not work as sumproduct search

    Not sure why you are saying that formatting will not work. Your sumproduct formula would contain
    =SUMPRODUCT(--(TEXT($A$1:$A$100, "MM/YY")="04/13"), .....

    However, if you are adamate about formatting as text, you could use the above in another column
    i.e. in B2, = TEXT(B1,"MM/YY")
    Please give more information if I am off the mark here (a spreadsheet always helps (Go Advanced> Manage Attachments))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    04-01-2013
    Location
    Cali
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Date function, Need MM/YY *Note:Formatting will not work as sumproduct search

    I added the file... The overall tab has a sumproduct that still won't work... I know it has to do with the date because once I change the date to an absolute date it works...

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Date function, Need MM/YY *Note:Formatting will not work as sumproduct search

    Okay, the problem is that your headers on your Overall Table are not text, they are dates formatted as mm/yy. For example I1 is actually 4/19/2013.

    I am assuming you want all dates that are in April 2013.
    You could change your formula in I2 (modified so you can copy across and down)
    =SUMPRODUCT((Sheet2!$C$3:$C$1595=$B2)*(Sheet2!$D$3:$D$1595=TEXT(I$1,"mm/yy"))*(Sheet2!$S$3:$S$1595))
    or if you want to get rid of Column D in sheet2
    =SUMPRODUCT((Sheet2!$C$3:$C$1595=$B2)*(TEXT(Sheet2!$D$3:$D$1595,"mm/yy") =TEXT(I$1,"mm/yy"))*(Sheet2!$S$3:$S$1595))

    OR
    you could change your header formulas
    =TEXT(Edate(Today(),0),"mm/yy")

    and modify the above formulas accordingly.
    Any of this make sense?

  5. #5
    Registered User
    Join Date
    04-01-2013
    Location
    Cali
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Date function, Need MM/YY *Note:Formatting will not work as sumproduct search

    Thank you thank you thank you

    Makes total sense and it worked like a charm!!!

+ 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