+ Reply to Thread
Results 1 to 29 of 29

Need help with time and liquid formula

  1. #1
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Question Need help with time and liquid formula

    Hello,

    I would like to use Excel and automate my calculations. Time will always vary but volume will be same
    Here's one example. Every 1 minute and 17 seconds 7.48 of liquid is used. How much of liquid was used in 1 day?

    Thanks in advance!

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    Try...
    =1/TIME(0,1,17)*7.48
    Approx. 8393.143 liquid used in a day.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    Try...
    =1/TIME(0,1,17)*7.48
    Approx. 8393.143 liquid used in a day.
    Thanks for the reply! How can I make it so that time is pulled from A1 in this format 1:17 and in C1 I will get total?

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    How is cell formatted? mm:ss?

    If so, then just =1/A1*7.48

    If that's not the case, I'll need to see the actual format and what's actually stored in the cell (meaning can you upload sample?).

  5. #5
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    How is cell formatted? mm:ss?

    If so, then just =1/A1*7.48

    If that's not the case, I'll need to see the actual format and what's actually stored in the cell (meaning can you upload sample?).
    Yes, its in 1:17. Please see attached.
    Attached Files Attached Files

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    Ok, so it's actually in h:mm format.

    In that case, you need to do adjustment like below.
    =1/A2*60*7.48

    Edit: Alternately...
    =1/TIME(0,HOUR(A2),MINUTE(A2))*7.48

  7. #7
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    Ok, so it's actually in h:mm format.

    In that case, you need to do adjustment like below.
    =1/A2*60*7.48

    Edit: Alternately...
    =1/TIME(0,HOUR(A2),MINUTE(A2))*7.48
    Hmm... With last edit I'm getting 3:25 in C2?

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    Make sure you format the cell (C2) as number.

    Otherwise, you will see it formatted as time. And time only show up to 23:59:59 and then rolls back down to 0:00:00.

  9. #9
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    Make sure you format the cell (C2) as number.

    Otherwise, you will see it formatted as time. And time only show up to 23:59:59 and then rolls back down to 0:00:00.
    Thanks, that's what I was missing! My calculations are always less than 10 minutes so I should be good.

    So, I've copied same formula down the column and entered 2:17 in A3 but in C3 I got 4717.313869 ? More time should equal more liquid used.

  10. #10
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    Huh? Your initial question was...
    Every 1 minute and 17 seconds 7.48 of liquid is used. How much of liquid was used in 1 day?
    If you change 1 minutes 17 seconds to 2 minutes 17 seconds... then, there will be less liquid used, since you are using same amount over longer period.

    No?

  11. #11
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Wait a minute if I enter 2:17 in A3 is that treated as 2 minutes and 17 seconds or 2 hours and 17 minutes?

  12. #12
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Need help with time and liquid formula

    Same volume over more time means your flow rate is slower, so over a constant time frame less liquid would be used.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  13. #13
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    if I enter 2:17 in A3 is that treated as 2 minutes and 17 seconds or 2 hours and 17 minutes?
    Cell stores it as 2 hour 17 minutes. But the formula I gave you in post #6 converts it to 2 minutes 17 seconds.

  14. #14
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    Huh? Your initial question was...


    If you change 1 minutes 17 seconds to 2 minutes 17 seconds... then, there will be less liquid used, since you are using same amount over longer period.

    No?
    Never mind, I was wrong and thinking about something else

  15. #15
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    Cell stores it as 2 hour 17 minutes. But the formula I gave you in post #6 converts it to 2 minutes 17 seconds.
    Ok, If I want to enter ie. 17 seconds would I still enter it as 0:17 ?

  16. #16
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    That would be correct. Note that since you have it in h:mm format, you can't use value greater than 23 hours, 59 minutes (i.e. 23 minutes 59 seconds).
    Otherwise you will get unexpected result.

    I'd recommend using [h]:mm:ss format and entering 17 seconds as 0:00:17. And use original formula of 1/A2*7.48

  17. #17
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    That would be correct. Note that since you have it in h:mm format, you can't use value greater than 23 hours, 59 minutes (i.e. 23 minutes 59 seconds).
    Otherwise you will get unexpected result.

    I'd recommend using [h]:mm:ss format and entering 17 seconds as 0:00:17. And use original formula of 1/A2*7.48
    Ok, I will start using [h]:mm:ss format. Can you please explain what 1 does in this formula? I've tried manually to calculate 1/17*7.48 but I'm getting 0.44 ?

  18. #18
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    Excel holds datetime value as double (I.E. decimal).
    1 hour = 1/24

    Hence, 1 = 24 hour = 1 day

    To manually calculate 1/17*60*60*24*7.48 = 38016

  19. #19
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    Excel holds datetime value as double (I.E. decimal).
    1 hour = 1/24

    Hence, 1 = 24 hour = 1 day

    To manually calculate 1/17*60*60*24*7.48 = 38016
    Thanks for explaining that!
    Based on the fact that in 0:01:17 7.48 is used how would I calculate how much is used in 1 minute and 1 hour?

  20. #20
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    1 min has 60 sec

    So, 60/17*7.48

    1 hour has 60 min

    So, 60*60/17*7.48

  21. #21
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Need help with time and liquid formula

    Micko - please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  22. #22
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by CK76 View Post
    1 min has 60 sec

    So, 60/17*7.48

    1 hour has 60 min

    So, 60*60/17*7.48
    Thanks!

    One thing that I don't understand why Excel does this but when I do calculations in E2 I get different result in F2 compared when I
    do it on my calculator 0.09 x 77 = 6.93 why is that?
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Quote Originally Posted by AliGW View Post
    Micko - please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Sorry, I got carried away

  24. #24
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    There's mistake in my post. I though you were calculating for 17 sec flow. If using 1 min 17 sec. Replace 17 in my post with 77.

    At any rate I'm not sure what the calculation in E2 of your sheet represents.
    =7480/86400

  25. #25
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    That's not your mistake, I was just testing different times under and over 1 minute. Making sure calculator and Excel have same results.

    Its a manual process that is done using calculator:

    1440 minutes x 60 seconds = 86,400 seconds.
    7480 gallons divided by 86,400 seconds = .09 gallons per second.
    1 minute, 17 seconds = 77 seconds.
    .09 gallons per second x 77 seconds = 6.93 gallons every 1 minute, 17 seconds.

  26. #26
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    Ok, that's because of rounding.

    While Excel displays 0.09 due to number format (decimal place of 2).

    Underlying value holds actual value (i.e. approx. 0.865740740741).

    So 77*0.865740740741 is approx 6.67 (6.666...)

  27. #27
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    You're right, I made a mistake. It should've been 7480 gallons divided by 86,400 seconds = .086 gallons per second and then the rest would have same end result as in Excel.

    If I want to use per minute (60/17*7.48) and per hour (60*60/17*7.48) calculations but instead to pull time from A2 how would I do that?

  28. #28
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Need help with time and liquid formula

    Something like below for per Minute
    =1/A2*7.48/24/60

    per hour.
    =1/A2*7.48/24

  29. #29
    Registered User
    Join Date
    03-21-2007
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Need help with time and liquid formula

    Thank you!

+ 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. Formula for Timesheet - Double Time, Time Half and normal Hours
    By Tracs13 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-12-2017, 09:40 PM
  2. Replies: 3
    Last Post: 08-12-2017, 01:48 AM
  3. [SOLVED] time sheet help, format TIME and formula based on the actual time entered.
    By bh mng in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-06-2016, 01:10 PM
  4. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  5. Replies: 5
    Last Post: 04-18-2013, 11:31 AM
  6. Formula for Calculating Paid Time Off for fiscal anniversary date real time
    By 168rockwood in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-07-2012, 04:15 PM
  7. Depth of liquid in hemisphere
    By Richard Buttrey in forum Excel General
    Replies: 27
    Last Post: 11-01-2011, 02:56 PM

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