+ Reply to Thread
Results 1 to 5 of 5

time, minus 15 mins

  1. #1
    Forum Contributor
    Join Date
    07-16-2007
    Posts
    174

    time, minus 15 mins

    hi, i have

    =TIME(LEFT(F17,FIND("h",F17)-1),RIGHT(F17,2),0)

    which gives a time in the format 9:30PM, or 10:30AM etc.

    How would i change the formula to give me a time minus 15 mins

    Eg, if the above formula gave me 8:45PM, i would want it to show 8:30PM

    Regards, jamie
    Last edited by oldchippy; 05-04-2009 at 09:23 AM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =TIME(LEFT(F17,FIND("h",F17)-1),RIGHT(F17,2)-15,0)
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

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

    May be something like this?

    =TIME(LEFT(F17,FIND("h",F17)-1),RIGHT(F17,2),0)-0.0104166666666667

    0.0104166666666667 being 15 mins expressed as a decimal part of a day
    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

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try

    =MOD(SUBSTITUTE(F17,"h",":")-"0:15",1)

    format as time

  5. #5
    Forum Contributor
    Join Date
    07-16-2007
    Posts
    174
    they all work, thanks all!

    Regards, jamie

+ 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