+ Reply to Thread
Results 1 to 6 of 6

Time vs. Temp - total positive slope

  1. #1
    Registered User
    Join Date
    01-13-2008
    Posts
    3

    Time vs. Temp - total positive slope

    I accumulate data for time vs. temperature, and would like to sum the times that the temperature is increasing - that is, if the temp in the next cell is greater than the current cell, show the time interval. Then at the end of a selected period, say when the date changes, sum the number of minutes that the temperature interval increased. I'm not sure of the correct formula to use.

    The spreadsheet I have consists of 3 columns: date, time (minutes), and temperature - can attach a sample if this is not clear.

    Thank you in advance.

    Grov

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hello there,

    If you want to provide a small zipped sample of your worksheet with exactly what you want then we can have a look for you.

    To post a zipped example, go to “My Documents” or wherever you have your file stored, right-click and “Send to > Compressed file”, then attach this zipped file to your post.
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    01-13-2008
    Posts
    3

    Here's the zipped example

    Here's an example for the first hour of the first day of January.

    I constructed this manually to illustrate the desired function from the real data.
    I may have to change the sample interval to get the desired resolution of the final data - right now it's set for a 2 minute sample, may have to go to 1 minute or even 30 seconds....

    Thanks again for help.

    Grov
    Attached Files Attached Files

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Does this work for you, in cell D1

    =IF(C3>C2,B3-B2,"") copy down

  5. #5
    Registered User
    Join Date
    01-13-2008
    Posts
    3

    Most excellent, and now......

    Your formula worked like a charm; I, being rusty (worked a lot with Excel 10-15 years ago), was overcomplicating things....

    Now, how to consolidate the data.....

    I want to get a sum of column D, when the date changes.... I've manually gone into the sheet, inserted a blank row, and used the sum function to capture all the times in column D - works great. But, how to automate (seems like I remember a function that would act when a value, like date, changed). Anyway, doing a sort on column D, because the formulas all relate to a previous cell, I get garbage; that is, I cannot get a sort to show me the total for a group of dates......

    Many thanks from this rusty old buzzard!

    Grov

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi Grov,

    Try this, I've altered the date format from dd.mm.yyyy to dd/mm/yyyy so that Excel will take it as a real date rather than text.
    Then I have copied the same data to the cells below for the next day (A33:A63).
    I've then adjusted the formula in D2 to calculate properly on change of day
    =IF(A2<>A3,"",IF(C3>C2,B3-B2,""))
    Then to get to sum on change of day, put this in E32
    =SUM(D2:D32)
    Then select E2:E32, drag down to E63, you should now have a total for day two.

+ Reply to 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