+ Reply to Thread
Results 1 to 5 of 5

Stumped on excel code for time calculation

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    Red Deer, Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Stumped on excel code for time calculation

    Hey Guys,

    Love the site and have referenced it many many times for help with excel. But i cannot seem to find anything to help me and here i am the newest member, and looking for help.

    I am trying to make a spreadsheet for work that will calculate hours remaining between two times. I would like to use the =Now () function to bring up the current time of day and i would like that time to be subtracted from the next day @ 09:00. I would like the dates to roll with the current calendar day if possible. Of if not just be able to reference 09:00.

    The exact time the next day is crucial. I can't seem to get the coding right, i would consider myself a rookie at excel so this may be a easy win for a expert.

    ie

    Hours remaining between

    July 7th @ 17:00 and July 8th @ 09:00

    Thanks in Advance
    Bandit

  2. #2
    Registered User
    Join Date
    02-09-2014
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    84

    Re: Stumped on excel code for time calculation

    09:00 AM
    11:21 =MOD(A1-NOW(),1)

    try this..

  3. #3
    Registered User
    Join Date
    07-07-2014
    Location
    Red Deer, Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Stumped on excel code for time calculation

    Looks like that works Vogel, thanks a million.

  4. #4
    Registered User
    Join Date
    07-07-2014
    Location
    Red Deer, Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Stumped on excel code for time calculation

    Is there a way to get it to round to the nearest hour?

    or to get the result to show in a decimal form. for example 12.5 or 12.75 hrs

  5. #5
    Registered User
    Join Date
    02-09-2014
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    84

    Re: Stumped on excel code for time calculation

    09:00 AM
    9.66 =MOD(A1-NOW(),1)*24

    try this..
    formatted as a number

+ 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. how to use code to reference a variety of other cells? stumped excel newbie
    By arlojwhite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-06-2014, 06:03 AM
  2. Calculating Remaining Date Time Hours - Error In My Calculation/Code
    By excelnube84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2012, 05:04 AM
  3. Excel Time Calculation
    By kris26 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-03-2011, 02:50 AM
  4. Master reset code bug - stumped again
    By peter.thompson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2006, 03:38 AM
  5. Master reset code -stumped
    By peter.thompson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-06-2006, 09:35 PM

Tags for this Thread

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