+ Reply to Thread
Results 1 to 5 of 5

Cell format being overwritten

  1. #1
    Registered User
    Join Date
    03-06-2018
    Location
    Orangeville, Ontario, Canada
    MS-Off Ver
    Excel 2013
    Posts
    21

    Cell format being overwritten

    Hello all,

    I have a very strange cell formatting issue. In one part of my spreadsheet, i have a cell formatted as Custom h:mm and it works fine. In another part of the same sheet, the date shows up in the formula bar as something like 5/3 1902 for exactly the same entry as the first cell and formatted exactly the same way. Also, the cell contents shows up as 0:00.

    Any pearls of wisdom?

    Thanks, Ian

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Cell format being overwritten

    If you have a "date" in a cell that looks like you showed... 5/3 1902 ...then I dount that is really a date, but is probably text that looks like a date. As such, no formatting will change that, formatting is only a cosmetic change to how a cell displays, it does not change the underlying contents.

    1st test the cell with =isnumber(cell-ref) FALSE indicates test. I also suggest that you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-06-2018
    Location
    Orangeville, Ontario, Canada
    MS-Off Ver
    Excel 2013
    Posts
    21

    Re: Cell format being overwritten

    Hello Ford,

    Thank you for your help.

    Please check Wednesday for Sarah under Hours Worked IN. Type in 859. Should show 8:59, not 0:00.

    Thanks!!
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Cell format being overwritten

    859 is not time, as far as excel is concerned, it is eight hundred and fifty-nine

    8:59 is time

    What you need to understand about dates and times in excel is…

    a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date. So, for instance, today (Tue 12 Feb 2019) is actually 43508

    Time is actually a decimal part of 1 (day), so 06:00 AM is 0.25, 12 noon is 0.5 and 18:00 (or 6 PM) is 0.75

  5. #5
    Registered User
    Join Date
    03-06-2018
    Location
    Orangeville, Ontario, Canada
    MS-Off Ver
    Excel 2013
    Posts
    21

    Re: Cell format being overwritten

    Thanks for your help!!

    Try putting in 859 into cell e4 and do the same for ak4. Also, note that there is a VB routine that works on those cells.

    Let me know what you get.

    Thanks again!!
    Ian

+ 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: 5
    Last Post: 01-22-2018, 07:14 AM
  2. Running Total that Feeds from Overwritten Cell
    By Adamac13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2017, 07:37 AM
  3. cell being overwritten by new information?
    By taylorjwbrown in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2014, 09:33 PM
  4. VBA Code Help - If file overwritten, continue. If file not overwritten, show warning.
    By spoliquin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2013, 05:03 PM
  5. Replies: 4
    Last Post: 06-22-2012, 03:16 PM
  6. Replies: 1
    Last Post: 02-20-2006, 01:11 AM
  7. [SOLVED] how do I automatically advance data to next cell when overwritten
    By today() in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2005, 12:05 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