Closed Thread
Results 1 to 10 of 10

Reduce 1 minute data to 30 minute data in Excel

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Unhappy Reduce 1 minute data to 30 minute data in Excel

    Hi All,

    I have a spreadsheet that contains per minute data for the whole year. There are no gaps in data and it is complete with various values being zero. I cannot work out how to reduce the data into 30 minutes interval. I have tried to use Pivot Tables and grouping functions but it can give me daily data or hourly data but not per 30 minutes or 15 minutes of data.

    Can someone please explain what step I can follow to reduce the per minute data to 15 minute or 30 minute data.

    Format of excel sheet is as below:

    Date------ Time------ GSR
    27/07/2010--0:00:00-- 1
    27/07/2010--0:01:00-- 2
    27/07/2010--0:02:00-- 0
    27/07/2010--0:03:00-- 0
    27/07/2010--0:04:00-- 1
    27/07/2010--0:05:00-- 1
    27/07/2010--0:06:00-- 1.5
    27/07/2010--0:07:00-- 0
    27/07/2010--0:08:00-- 0
    27/07/2010--0:09:00-- 2

  2. #2
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Reduce 1 minute data to 30 minute data in Excel

    can you provide us a sample workbook in which sheet1 should contains your problem data and sheet2 should contains your manually solution data only for example
    so that we can understand your problem and we can help you....as quickly

    Regards
    CA Mahaveer Somani

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Reduce 1 minute data to 30 minute data in Excel

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook. Make sure the workbook demonstrates your desired results, too.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    02-27-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Reduce 1 minute data to 30 minute data in Excel

    Here is the sample file. So I want to change 5 minutes data to 30 minute average as shown in this spreadsheet. Also, for another exercise I need to convert 1 minute data into 30 minute average.


    I really apologies for taking so long to paste the spreadsheet up, I was actually away from work for a while. Hope to hear back from you soon.

    Cheers
    Attached Files Attached Files

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Reduce 1 minute data to 30 minute data in Excel

    1) Put the first timevalue in cell L2

    2) Enter the formula shown in L3, and copy L3 downward as far as needed.
    =INT(L2) + TIME(HOUR(L2), MINUTE(L2)+30, 0)

    3) Enter the formula shown in M2 and copy across the table:
    =AVERAGE(OFFSET(INDEX(B:B, MATCH($L2,$A:$A, 0)), -5, , 6, 1))
    Attached Files Attached Files

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Reduce 1 minute data to 30 minute data in Excel

    Insert a helper column between columns B and C and format as general. Enter this formula in C21 and copy down the length of your data:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This will insert a 1 for minutes greater than 0 and less than or equal to 30 and a 2 for all other minutes.

    Click on the Timestamp cell and click on the Data Tab, Subtotals.

    Select At each change in Helper, Use Function AVERAGE. In the Add Subtotal to, select everything except Timestamp. Select Summary Below Data and click OK.

    Now you will have controls to the left of the data. Click on each one under 2 (second column of controls) and the report that you gave as an example is produced.

    This is an attempt to copy the results into the answer.

    TIMESTAMP Helper WindSpeed WindDirect Air_temperature RH Pyranometer_Avg Reference1_Avg Reference2_Avg Month Day
    1 Average 1 4.25 177.0666667 9.6 71.11666667 548.8333333 515.1666667 494 12 11
    2 Average 2 3.883333333 171.0833333 9.666666667 71.41666667 482.6666667 452.1666667 599.3333333 12 11
    Grand Average 1.5 4.066666667 174.075 9.633333333 71.26666667 515.75 483.6666667 546.6666667 12 11
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    02-27-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Reduce 1 minute data to 30 minute data in Excel

    Oh Thank you very much Mr Administrator. I made very minor adjustments with the formulae provided my you and it WORKS :D

    Appreciate it alot.

    Regards

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Reduce 1 minute data to 30 minute data in Excel

    If that takes care of your original query, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

  9. #9
    Registered User
    Join Date
    02-21-2022
    Location
    italy
    MS-Off Ver
    2019
    Posts
    3

    Re: Reduce 1 minute data to 30 minute data in Excel

    Hi JBeaucaire

    I want to change 3.20 minutes data to 30 minute average as shown in the spreadsheet (S1). I tried to replicate your formula

    =AVERAGE(OFFSET(INDEX(B:B, MATCH($L4,$A:$A, 0)), -5, , 6, 1))

    Believing it could easily be reused with minor changes.

    =AVERAGE(OFFSET(INDEX(A:A, MATCH($F3,$A:$A, 0)),-8, ,9,1)) but it gives me N/A error

    I cannot understand why I don't get the correct value like in S2.

    Can you help me?

    Thanks
    Luca
    Attached Files Attached Files

  10. #10
    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,098

    Re: Reduce 1 minute data to 30 minute data in Excel

    This thread is 9 years old.

    It's a forum rule that you start your own thread, rather than "piggy-backing" on someone else's thread. This helps prevent massive confusion arising - which will happen if it is not clear which question is being answered. So please start your own thread and explain your own problem (make sure that, right from the start, you use a meaningful title (NOT things like "help needed" or "urgent problem"... think of the Google search terms that you would use to find the solution).

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 pictures. So, prepare a SMALL sample sheet (10-20 rows, not thousands!!!). Make sure there is enough data to demonstrate your need. Make sure your desired results are shown, mock them up manually if necessary. Remember to remove ALL confidential information first!!!


    The yellow banner about sample worksheets, at the top of the screen tells you how to post a sheet here on the Forum.
    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

Closed 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