Hourly to daily data conversion and finding min and max

mrnassaro

New Member
Joined
Jan 23, 2015
Messages
27
Office Version
  1. 2016
Platform
  1. Windows
Hello Experts!

I am working on finding the daily min, max, and average from the below data. I tried to do it based on date and using Offset but every time I am getting an error. I have excel 2016, so the Filter formula doesn't work.

1665546857425.png
 
Last edited by a moderator:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
For the future, sample data that can be copied will generally get you faster help & more helpers. :).
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

See if something like this helps.

22 10 12.xlsm
ABCDEF
1MinMaxAvg
21/01/2019 2:00661/01/2019159754
31/01/2019 3:00322/01/2019129541.75
41/01/2019 4:00563/01/2019N/AN/AN/A
51/01/2019 5:0080
61/01/2019 6:0064
71/01/2019 7:0029
81/01/2019 8:0043
91/01/2019 9:0097
101/01/2019 10:0068
111/01/2019 11:0038
121/01/2019 12:0027
131/01/2019 13:0015
141/01/2019 14:0081
151/01/2019 15:0057
161/01/2019 16:0042
171/01/2019 17:0037
181/01/2019 18:0045
191/01/2019 19:0056
201/01/2019 20:0060
211/01/2019 21:0094
221/01/2019 22:0036
231/01/2019 23:0065
242/01/2019 0:0095
252/01/2019 1:0012
262/01/2019 2:0017
272/01/2019 3:0043
28
Daily
Cell Formulas
RangeFormula
D2:D4D2=IFERROR(AGGREGATE(15,6,B$2:B$300/(INT(A$2:A$300)=C2),1),"N/A")
E2:E4E2=IFERROR(AGGREGATE(14,6,B$2:B$300/(INT(A$2:A$300)=C2),1),"N/A")
F2:F4F2=IFERROR(AVERAGEIFS(B$2:B$300,A$2:A$300,">="&C2,A$2:A$300,"<"&C2+1),"N/A")
 
Upvote 0
Thank you very much for the help, it actually works!

I was wondering what did you do to select the hourly time and make them into daily ?
 
Upvote 0
Thank you very much for the help, it actually works!
You're welcome. Thanks for the confirmation. :biggrin:

I was wondering what did you do to select the hourly time and make them into daily ?
Excel stores dates as whole numbers and times as decimals. So, for example, if you hover over cell A6 in my mini sheet you should see this
1665626070034.png

1 January 2019 is day number 43466 (counting from 1 January 1900 as day 1) and 6:00 AM is one quarter (0.25) of a day so ..
For the Max & Min results I used INT(A$2:A$300) which just chops off the hours and leaves the date.
For the Average result I looked for dates and times greater than or equal to 1/1/2019 (C2) and less than 2/1/2019 (C2 +1). That gives me all the rows some time during 1/1/2019
 
Upvote 0
You're welcome. Thanks for the confirmation. :biggrin:


Excel stores dates as whole numbers and times as decimals. So, for example, if you hover over cell A6 in my mini sheet you should see this
View attachment 76109
1 January 2019 is day number 43466 (counting from 1 January 1900 as day 1) and 6:00 AM is one quarter (0.25) of a day so ..
For the Max & Min results I used INT(A$2:A$300) which just chops off the hours and leaves the date.
For the Average result I looked for dates and times greater than or equal to 1/1/2019 (C2) and less than 2/1/2019 (C2 +1). That gives me all the rows some time during 1/1/2019
Thank you very much for taking the time to explain the process. I truly appreciate it!
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,323
Members
448,887
Latest member
AirOliver

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top