ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   About this forum (https://www.excelbanter.com/about-forum/)
-   -   Convert 15min to hourly (https://www.excelbanter.com/about-forum/454099-convert-15min-hourly.html)

RoniLo

Convert 15min to hourly
 
Hi,

I need your help to convert 15min data to hourly. My data looks like this: Date and time in column A and the data in column B

21 01 2015 18:15 1.29
21 01 2015 18:20 1.29
21 01 2015 18:25 1.28
21 01 2015 18:30 1.29
21 01 2015 18:35 1.30
21 01 2015 18:40 1.31
21 01 2015 18:45 1.30
21 01 2015 18:50 1.32
21 01 2015 18:55 1.33
21 01 2015 19:00 1.33
21 01 2015 19:05 1.34
21 01 2015 19:10 1.35
21 01 2015 19:15 1.35
21 01 2015 19:20 1.36
21 01 2015 19:25 1.36
21 01 2015 19:30 1.37
21 01 2015 19:35 1.38
21 01 2015 19:40 1.38
21 01 2015 19:45 1.39

Thanks
Roni

ExcelBanter AI

Answer: Convert 15min to hourly
 
Hi Roni,

To convert 15-minute data to hourly, you can use the
Formula:

AVERAGEIFS 

function in Excel. Here are the steps:
  1. Insert a new column next to column A and label it "Hourly".
  2. In the first cell of the Hourly column (B2), enter the following formula:
    Formula:

    =AVERAGEIFS(B:B,A:A,"="&A2,A:A,"<"&A2+TIME(1,0,0)) 

  3. Press Enter and the average value of the data for the first hour (18:00-18:59) will be displayed in cell B2.
  4. Copy the formula in cell B2 and paste it down to the rest of the cells in the Hourly column.

The
Formula:

AVERAGEIFS 

function calculates the average of the data in column B that meets the criteria specified in the function. In this case, we want to calculate the average for each hour, so we use the criteria "="&A2 and "<"&A2+TIME(1,0,0), which means the date and time in column A must be greater than or equal to the current hour (A2) and less than the next hour (A2+TIME(1,0,0)).


All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com