+ Reply to Thread
Results 1 to 13 of 13

Record Max Temp Each Day

  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    richland, missouri
    MS-Off Ver
    2013
    Posts
    7

    Record Max Temp Each Day

    I have a spreadsheet that collects data on temperature every 5 minutes each day for several months. The date/time is in column A and the temp is in column B. I need a way to find the max temp each day and place the date (once each day) in column C and the max temp for that day in column D. column C and D will be much shorter columns (as there will only be one cell of temp data for each day).
    Thanks for your help!

  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,141

    Re: Record Max Temp Each Day

    Please attach a sample workbook. 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!!!

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    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

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Record Max Temp Each Day

    One way...

    Data Range
    A
    B
    C
    D
    E
    1
    Date/Time
    Temp
    ------
    Date
    Max Temp
    2
    1/1/2015 12:00 AM
    48
    1/1/2015
    48
    3
    1/1/2015 12:05 AM
    48
    1/2/2015
    54
    4
    1/1/2015 12:10 AM
    47
    1/3/2015
    46
    5
    1/1/2015 12:15 AM
    46
    6
    1/1/2015 12:20 AM
    46
    7
    1/2/2015 12:00 AM
    52
    8
    1/2/2015 12:05 AM
    53
    9
    1/2/2015 12:10 AM
    54
    10
    1/2/2015 12:15 AM
    53
    11
    1/2/2015 12:20 AM
    53
    12
    1/3/2015 12:00 AM
    42
    13
    1/3/2015 12:05 AM
    43
    14
    1/3/2015 12:10 AM
    44
    15
    1/3/2015 12:15 AM
    44
    16
    1/3/2015 12:20 AM
    46


    Enter this formula in D2:

    =INT(A2)

    Format as Date

    Enter this array formula** D3 and copy down until you get blanks:

    =IFERROR(1/(1/MIN(IF(INT(A$2:A$16)>D2,INT(A$2:A$16)))),"")

    Format as Date

    Enter this array formula** in E2 and copy down until you get blanks:

    =IF(COUNT(D2),MAX(IF(INT(A$2:A$16)=D2,B$2:B$16)),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    05-29-2015
    Location
    richland, missouri
    MS-Off Ver
    2013
    Posts
    7

    Re: Record Max Temp Each Day

    Thanks so much. I am putting what you gave into a practice spreadsheet but it is not working. I am attaching it so you can look at it. I do appreciate this.
    Attached Files Attached Files

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Record Max Temp Each Day

    The formulas in D3 and E2 are array formulas.

    Array formulas are entered differently than a regular formula. After you type in a regular formula you hit the ENTER key. With an array formula you must use a combination of keys. Those keys are the CTRL key, the SHIFT key and the ENTER key. That is, hold down both the CTRL key and the SHIFT key then hit the ENTER key.

    When done properly Excel will enclose the formula in squiggly brackets { }. You can't just type these brackets in, you must use the key combo to produce them. Also, anytime you edit an array formula it must be re-entered as an array using the key combo.

    So, enter those formulas as array formulas then copy them down until you get blanks.

  6. #6
    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,141

    Re: Record Max Temp Each Day

    You didn't enter it as an array. They're a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...
    Attached Files Attached Files

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Record Max Temp Each Day

    If you do not CTRL+SHIFT+ENTER you will get an error message or an incorrect answer.
    That is an incorrect statement. They need to fix it (and I have suggested they do it a few times)!

    It is possible to get a correct result depending on the circumstances.

  8. #8
    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,141

    Re: Record Max Temp Each Day

    Here's a non-array version to calculate the maximum tem.

    =AGGREGATE(14,4,$B$2:$B$16*(INT(A$2:$A$16)=D2),1)

  9. #9
    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,141

    Re: Record Max Temp Each Day

    I didn't know that - do you happen to have a reference to an example?

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Record Max Temp Each Day

    There was a post a couple of weeks ago that demonstrated this perfectly.

    I'll see if I can find it but it will be later this evening as I have to go offline for several hours.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Record Max Temp Each Day


  12. #12
    Registered User
    Join Date
    05-29-2015
    Location
    richland, missouri
    MS-Off Ver
    2013
    Posts
    7

    Thumbs up Re: Record Max Temp Each Day

    Thank you so much! That worked perfectly. I was not aware of array formulas.
    Is there a link somewhere that give me more of an introduction to array formulas?
    I did not try the aggregate function but hope to in the future.
    Thanks again for everyone's input.

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Record Max Temp Each Day

    Quote Originally Posted by roamanzambia View Post
    Is there a link somewhere that give me more of an introduction to array formulas?
    Here ya go:

    http://cpearson.com/excel/ArrayFormulas.aspx

+ 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. Copy specific data from a sheet to temp sheet and copy temp sheet to new workbook
    By ANUARORA in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2015, 11:58 AM
  2. Replies: 1
    Last Post: 01-12-2015, 08:07 PM
  3. how to copy specific data from a sheet to temp sheet and copy temp sheet toa new workbook?
    By NatashaKapoor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-18-2014, 09:01 AM
  4. Replies: 1
    Last Post: 11-16-2012, 09:25 AM
  5. Command Buttons for Viewing Record, Next Record and Previous Record
    By david1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2012, 06:30 AM

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