+ Reply to Thread
Results 1 to 7 of 7

converting a huge dataset from minutes to days

  1. #1
    Registered User
    Join Date
    03-06-2021
    Location
    Norrway
    MS-Off Ver
    Latest
    Posts
    3

    converting a huge dataset from minutes to days

    I have a huge dataset that goes from row A2 to row A105393. Each row has a timestamp of 5 minutes. For example row A2 contains the timestamp of 2020-01-01 00:00:38 while row A3 shows 2020-01-01 00:05:38. This goes on until the the end of 2020.

    What I want is to summarize all those minutes into daily outputs. To get the daily demand for 2020-01-01, I have to manually drag and use the SUM function from A2 to A289. Having a dataset containing 105393 rows, this is gonna take some while to get the daily demand over a year. I have attached a small portion of the dataset.


    Let's say I want the total demand for that whole day, how can I do this instead of dragging all the rows?

    Thank you in advance!
    Attached Files Attached Files
    Last edited by sorrym4te; 03-07-2021 at 07:52 AM. Reason: Adding small exceel sheet

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: converting a huge dataset from minutes to days

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: converting a huge dataset from minutes to days

    Use a pivot table with the date/times as a row item and sum of outputs as a data field.

    Excel will automatically group by days, months, years etc.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    03-06-2021
    Location
    Norrway
    MS-Off Ver
    Latest
    Posts
    3

    Re: converting a huge dataset from minutes to days

    Thank you for your reply.

    I have tried to use a pivot table, and tried to sort the date/time using Group Selection. I clicked on the first cell and then clicked on Analyze - Group Selection.
    But I get an error saying that I can't group the marked area.

    Is it because of the way the date/time is formulated in the cells?


    EDIT:
    I have tried to remove the time and only keeping the date for a small sample, and it seems I can group it this time.
    So to make this work I have to remove the time for all the 105k+ rows... :P
    Is there any faster way to do this? haha
    Attached Files Attached Files
    Last edited by sorrym4te; 03-06-2021 at 10:54 AM. Reason: typo

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: converting a huge dataset from minutes to days

    Maybe:

    E2
    =SEQUENCE(366,,DATE(2020,1,1),1)

    F2, copied down:
    =SUMPRODUCT((LEFT(TRIM($A$2:$A$21),10)+0=E2)*$B$2:$B$21)

    see sheet. Adjust ranges as needed in the SUMPRODUCT formula.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-06-2021
    Location
    Norrway
    MS-Off Ver
    Latest
    Posts
    3

    Re: converting a huge dataset from minutes to days

    It worked!
    Thank you very very much!!

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: converting a huge dataset from minutes to days

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

+ 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. converting minutes to days, hours and minutes.
    By TheGrimm in forum Excel General
    Replies: 8
    Last Post: 11-23-2015, 02:23 AM
  2. Sum of hours and minutes over 1000hrs and converting to week days
    By Chito in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2013, 09:37 AM
  3. Converting to Days, Hours and Minutes
    By StaceyB in forum Excel General
    Replies: 7
    Last Post: 02-29-2012, 02:42 PM
  4. Macro to filter a huge dataset
    By zilem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2011, 01:09 PM
  5. Converting an average figure into days and minutes.
    By Stevie-B in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2008, 10:23 AM
  6. [SOLVED] converting Days Hours & minutes into just minutes in excel
    By Six Sigma Blackbelt in forum Excel General
    Replies: 5
    Last Post: 04-28-2006, 04:45 PM
  7. [SOLVED] Converting A Quarterly Dataset to Weekly Dataset
    By Dan Thompson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-25-2005, 05:30 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