+ Reply to Thread
Results 1 to 5 of 5

Adding d h:mm to =NOW()

  1. #1
    Registered User
    Join Date
    05-30-2014
    Location
    Lima, Peru
    Posts
    31

    Question Adding d h:mm to =NOW()

    :Hi,
    I have a cell with formatted with "mmm/d h:mm". The value in the cell is "=NOW()". It provides the value of ... Nov/30 19:30 'cell R26'

    The next cell is formatted with "d h:mm". It's value is 17 2:33 (17 days, 2hrs, and 44 minutes.) 'cell R27'

    The next cell value R28=R26+R27, with the cell format of "m/d h:mm". It doesn't matter how I format it, it always returns a #VALUE! error.
    Attached Files Attached Files
    Last edited by Mr.GfCs; 11-30-2020 at 10:22 PM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Adding d h:mm to =NOW()

    The value in "R27" (appears to be T26 in sample file) is the text literal "17 2:33" which has no numeric meaning (yet) to the spreadsheet. Excel does not know how to add a number (the =NOW() function) and a text string, so you get a #Value error.

    You need to enter the correct number value into T26 -- 17.10625. However you want to enter that number will work. You could enter =17+TIME(2,33,0) or 17 Jan 1900 2:33:00 or =17+CONVERT(2,"hr","day")+CONVERT(33,"min","day") or any other entry method that will work to get the correct value in T26. Once you have the correct number in T26, the addition in V26 will be automatic.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Adding d h:mm to =NOW()

    The V26 formula needs to be

    =R26+LEFT(T26,FIND(" ",T26))+REPLACE(T26,1,FIND(" ",T26),"")

    because T26 is text rather than a numeric date+time.

  4. #4
    Registered User
    Join Date
    05-30-2014
    Location
    Lima, Peru
    Posts
    31

    Re: Adding d h:mm to =NOW() answered

    That fixed it. thanks. However, the T26 cells format is 'd h:mm'. it's combined with U26..... but I pasted what you said and it works.

    Thanks

    Quote Originally Posted by hrlngrv View Post
    The V26 formula needs to be

    =R26+LEFT(T26,FIND(" ",T26))+REPLACE(T26,1,FIND(" ",T26),"")

    because T26 is text rather than a numeric date+time.

  5. #5
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Adding d h:mm to =NOW() answered

    Quote Originally Posted by Mr.GfCs View Post
    . . . However, the T26 cells format is 'd h:mm'. . . .
    Irrelevant. The actual entry in cell T26 is text. Try =COUNT(T26). If it returns 0, then T26 isn't a numeric date+time.

    I don't believe Excel will accept date+time entries like 17 2:33. I tried, admittedly using Excel 2000, first formatting a cell with number format d h:mm. I entered 17 2:33, and Excel entered it as text.

+ 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. Replies: 1
    Last Post: 07-29-2020, 09:51 AM
  2. Replies: 13
    Last Post: 07-16-2016, 10:53 PM
  3. Adding rows to multiple sheets when adding new item using DataForm
    By pandora1a2b in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2014, 01:00 PM
  4. [SOLVED] adding target lines into graphs without adding an extra column of data
    By ea223 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-16-2013, 12:32 PM
  5. Replies: 2
    Last Post: 04-06-2012, 02:42 PM
  6. Replies: 0
    Last Post: 04-18-2011, 06:39 PM
  7. Replies: 2
    Last Post: 05-16-2010, 11:23 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