+ Reply to Thread
Results 1 to 4 of 4

Code returns a number rather than a date

  1. #1
    Registered User
    Join Date
    10-26-2013
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    6

    Code returns a number rather than a date

    Hi,

    EDIT: I'm sorry ... a number rather than a TIME

    The code below returns a number [like 0.956134259259259] instead of the time value that's in the cell [from row, 7].
    The date value [from row,6] returns properly formatted.
    Does anyone know why it's doing this & how it can be resolved please.
    Thanks for reading the post.

    Please Login or Register  to view this content.
    thanks and regards
    Last edited by LordBucketHead; 09-09-2014 at 05:28 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Code returns a number rather than a date

    Excel stores dates and time as numbers. You use numberformat to display that number as hours and minutes.

    You could use either of these to format the number as time
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-26-2013
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Code returns a number rather than a date

    Andy, you genius... I'm the happiest man on earth right now
    Thank you very much indeed sir

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Code returns a number rather than a date

    You may also use:
    Please Login or Register  to view this content.
    to return value of cell exactly how it is displayed.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

+ 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. [SOLVED] VBA code returns "0" and no other number
    By Phillip Maddi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2013, 06:33 PM
  2. [SOLVED] read in full number and returns number.
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2012, 08:20 AM
  3. Replies: 5
    Last Post: 02-02-2010, 05:01 AM
  4. date returns as a serial number
    By gico1972 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-14-2010, 12:45 PM
  5. Date Value Returns a Number in Cell
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2009, 01:42 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