+ Reply to Thread
Results 1 to 7 of 7

Date format issues with sumproduct formula?

  1. #1
    Registered User
    Join Date
    08-01-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2010
    Posts
    18

    Date format issues with sumproduct formula?

    Hi guys,

    I've got a data table with a whole load of dates in the following format:

    Column A: DD-MM-YYYY HH:MM:SS

    I'm trying to do a sumproduct based on anything within a specific hour, so I've used the following formula to set up another Date column that ignores the MM:SS element of the date:

    Column R =IF(DAY(B2)<10,"0"&DAY(B2)&"/"&MONTH(B2)&"/"&YEAR(B2)&" "&HOUR(B2)&":00",DAY(B2)&"/"&MONTH(B2)&"/"&YEAR(B2)&" "&HOUR(B2)&":00")

    So in R2 I have 04/10/2012 10:00

    On another sheet I've tried to set up a cumulative list of dates, increasing by 1 hour so that I can then use a sumproduct function to return certain values:

    Cell A2 =Sheet1!R2 This returns 04/10/2012 10:00

    I've then got a formula in cells A2 etc that adds 1 hour to the previous cell:

    =A2+ TIME(1,0,0)

    Now the sumproduct works for the A2 reference but not for A3 etc. I can see that there's a formatting difference between A2 and A3, as the number in A3 moved to the right ever so slightly. eg

    A2 04/10/2012 10:00
    A3 _04/10/2012 11:00
    A4 _04/10/2012 12:00 <edit> the post isn't showing the slight indent so I've forced it across with a "_", ignore this
    etc.

    Any ideas what's going wrong? Am I going in completely the wrong direction? I'm sure it's some sort of formatting issue...

    Cheers,

    Jed.
    Last edited by Jed Shields; 10-19-2012 at 04:55 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Date format issues with sumproduct formula?

    Attach a sample file with examples and the required output for getting quick solution.

    ---

    Sixthsense


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Date format issues with sumproduct formula?

    You will need to upload a workbook with some sample data and details of what you require and where.

    Are you after something along these lines to obtain a month, time or whatever!!!

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-01-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Date format issues with sumproduct formula?

    Thanks guys, I'm tied up at the mo, I'll try and post something later

  5. #5
    Registered User
    Join Date
    08-01-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Date format issues with sumproduct formula?

    Quick question ... how do I upload the workbook?

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Date format issues with sumproduct formula?

    Go Advanced, then Attachments

  7. #7
    Registered User
    Join Date
    08-01-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Date format issues with sumproduct formula?

    Ahhhh! It's a whole new world of opportunities :D

    I'm having trouble uploading the file, it could be a work office issue. I'll try it from home later

+ 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