+ Reply to Thread
Results 1 to 6 of 6

Flooring timestamp to minutes mystery (Have solution that doesn't quite work)

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    71

    Flooring timestamp to minutes mystery (Have solution that doesn't quite work)

    Having a very long list of timestamps with seconds presicion I want to sum the value for each minute.

    I found a solution in this link, but the implementation fails on most of my value.

    If I correct my written value of my "Minutes for SUMIF" manually, I get results, but my array of needed minutes are much too long for that. I tend to believe it's some sort of rounding error, but displaying the time values as numbers does not show any.

    What could cause this mystery and how can I help it?

    Thanks in advance,


    Gregers_DK
    Attached Files Attached Files

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Flooring timestamp to minutes mystery (Have solution that doesn't quite work)

    Try this formula

    =SUMPRODUCT($B$2:$B$25921,--(ROUND($C$2:$C$25921,6)=ROUND(E2,6)))

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Flooring timestamp to minutes mystery (Have solution that doesn't quite work)

    Another way:

    Row\Col
    A
    B
    C
    D
    E
    F
    1
    Timestamp
    Value
    Minute
    SumIf
    2
    03/16/2014 02:21:56
    0.000
    03/16/2014 02:20
    0.000
    E2: =SUMIF($A$2:$A$11431, "<" & D2 + 1/1440, $B$2:$B$11431) - SUM(E$1:E1)
    3
    03/16/2014 02:22:16
    0.000
    03/16/2014 02:21
    0.000
    4
    03/16/2014 02:22:36
    0.000
    03/16/2014 02:22
    19.211
    5
    03/16/2014 02:22:53
    7.800
    03/16/2014 02:23
    80.427
    6
    03/16/2014 02:22:58
    11.411
    03/16/2014 02:24
    47.984
    7
    03/16/2014 02:23:03
    14.337
    03/16/2014 02:25
    65.861
    8
    03/16/2014 02:23:08
    15.995
    03/16/2014 02:26
    83.027
    9
    03/16/2014 02:23:19
    17.050
    03/16/2014 02:27
    87.776
    10
    03/16/2014 02:23:39
    17.050
    03/16/2014 02:28
    84.150
    11
    03/16/2014 02:23:40
    15.995
    03/16/2014 02:29
    87.898
    12
    03/16/2014 02:24:00
    15.995
    03/16/2014 02:30
    68.299
    13
    03/16/2014 02:24:20
    15.995
    03/16/2014 02:31
    100.401


    I chopped off a bunch of the zero values at the top of the data.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    11-07-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    71

    Re: Flooring timestamp to minutes mystery (Have solution that doesn't quite work)

    I never thought about using the cumulative values! Thanks!

    Gregers_DK

  5. #5
    Registered User
    Join Date
    11-07-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    71

    Re: Flooring timestamp to minutes mystery (Have solution that doesn't quite work)

    I should note, that I used the solution from shg after making a correction:

    While he has the idea right, I did not manage to use the latter part (SUM($E$1:E1)) correctly, for reasons unknown. Instead I rewrote this part, so the formula now is as underneath.
    For E2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Technically it should do the same, but it now works with just samples of the data.


    Gregers_DK

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Flooring timestamp to minutes mystery (Have solution that doesn't quite work)

    That's an unnecessarily more complicated formula, but you're welcome.
    Last edited by shg; 11-12-2014 at 12:11 PM.

+ 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. Timestamp Doesn't Work When Workbook Is Shared
    By Anaky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-19-2014, 10:27 AM
  2. Replies: 1
    Last Post: 02-21-2014, 12:11 PM
  3. Replies: 5
    Last Post: 06-21-2012, 10:12 AM
  4. When a timestamp doesn't behave as a timestamp
    By mredekopp in forum Excel General
    Replies: 3
    Last Post: 03-07-2011, 03:39 PM
  5. mystery number solution
    By Keven in forum Excel General
    Replies: 4
    Last Post: 07-21-2005, 07:05 PM

Tags for this Thread

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