+ Reply to Thread
Results 1 to 5 of 5

Adding a hard coded time (hh:mm) to the end of a DATE formula within the same cell

  1. #1
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Adding a hard coded time (hh:mm) to the end of a DATE formula within the same cell

    Hello EXCEL Gurus. I need to add a hardcoded TIME (military) to the end of a DATE formula in a specific range of cells in Col A.
    The current formula in these cells is: =TODAY()-WEEKDAY(TODAY(),3)+IF(WEEKDAY(TODAY(),3)>4,11,4)
    I would like the end result to be: 06/19/2015 13:00.
    The Time will be different in each cell and will serve as a guide and also be used for sorting purposes.
    Any advice would be greatly appreciated!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Adding a hard coded time (hh:mm) to the end of a DATE formula within the same cell

    =yourFormula + "13:00"
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Adding a hard coded time (hh:mm) to the end of a DATE formula within the same cell

    you just have to add a fraction of a day (like 1/24) to your actual formula. The fraction of a day will show up a the time. You'll have to change the cells' format though.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Adding a hard coded time (hh:mm) to the end of a DATE formula within the same cell

    What do you mean the time will be different in each cell?

    If you wanted to hard code the time into the formula you posted you could use this,
    HTML Code: 
    and format the cell with the formula with this - mm/dd/yyyy hh:mm.
    Last edited by Norie; 06-16-2015 at 06:43 PM. Reason: Formula tags don't seem to like < or maybes it's >
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: Adding a hard coded time (hh:mm) to the end of a DATE formula within the same cell

    Thank You shg, p24leclerc, & Norie - You guys rock!

+ 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. Replace hard coded date with variable.
    By Steve2107 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-27-2015, 08:58 PM
  2. [SOLVED] IF Formula ( Hard-Coded )
    By DespoExcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2014, 04:37 PM
  3. Replies: 5
    Last Post: 08-21-2014, 09:10 AM
  4. [SOLVED] Convert Hard-coded cell values to constants
    By Takeadoe in forum Excel General
    Replies: 2
    Last Post: 05-19-2006, 08:10 PM
  5. [SOLVED] Convert Hard-coded cell values to constants
    By Takeadoe in forum Excel General
    Replies: 2
    Last Post: 05-19-2006, 11:45 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