+ Reply to Thread
Results 1 to 7 of 7

Formatting a cell for Time

  1. #1
    Registered User
    Join Date
    07-02-2020
    Location
    Carroll, IA
    MS-Off Ver
    10
    Posts
    8

    Formatting a cell for Time

    Hello,

    I have a spreadsheet with a column for Duration. I formatted the column Custom [h]:mm:ss. The formatting will only take if I highlight the cell and press F2 then enter.

    I have 16000 entries to do this with for each month. Is there a way run a macro to do this for me or some how except the format for each cell?

    I am attempting to run SUMPRODUCT on the duration of time, but the cells will not be included in the function unless I run F2 and enter on each cell.

    Thanks,
    Dan

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,898

    Re: Formatting a cell for Time

    Welcome to the forum.

    That sounds wrong. Can you share a workbook demonstrating the problem?

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Formatting a cell for Time

    I have a spreadsheet with a column for Duration. I formatted the column Custom [h]:mm:ss. The formatting will only take if I highlight the cell and press F2 then enter.
    That sounds like the time values are "numbers stored as text". F2-enter is only one strategy for converting numbers stored as text to real numbers. Other strategies here: https://support.microsoft.com/en-us/...rs=en-us&ad=us
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    07-02-2020
    Location
    Carroll, IA
    MS-Off Ver
    10
    Posts
    8

    Re: Formatting a cell for Time

    If you look at tab Jan 2020 column K is Duration. I formatted the column but the time will not add to the bottom sum unless I click on the cell, press F2 then enter. K3 thru K6 have not been processed with F2. You should see the total increase as the each cell is processed.

    I took a great number of rows out to show this. I am just trying to figure out how to except the time format without entering each cell separately.

    Thanks,
    Dan
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formatting a cell for Time

    Try this
    Select the column (one column at a time), go to Data Ribbon Tab and select Text to Columns
    Just click "Finish" when the Text To Columns window opens.
    Did that fix the problem?
    Last edited by ChemistB; 07-02-2020 at 12:45 PM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,898

    Re: Formatting a cell for Time

    It's because the entries are text, not real times. The F2 process converts them, as does entering the cursor in the cell and hitting ENTER.

  7. #7
    Registered User
    Join Date
    07-02-2020
    Location
    Carroll, IA
    MS-Off Ver
    10
    Posts
    8

    Re: Formatting a cell for Time

    Text to Columns is the tool I needed. Thanks for the Help!!

+ 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. Date & time single cell formatting
    By djg1991 in forum Excel General
    Replies: 9
    Last Post: 03-12-2014, 02:31 PM
  2. [SOLVED] Need Help formatting the date and time together in one cell
    By Lylestyle89 in forum Excel General
    Replies: 4
    Last Post: 09-05-2013, 05:52 PM
  3. formatting a cell as time h:mm
    By readingmommy in forum Excel General
    Replies: 6
    Last Post: 02-15-2012, 09:46 AM
  4. Formatting a cell for time
    By Ogbuehi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-19-2009, 08:51 AM
  5. Changing Formatting on a cell for a limited time
    By amoorman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2009, 06:22 AM
  6. Auto formatting a time in a cell
    By drgogo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-05-2008, 09:14 AM
  7. [SOLVED] Formatting a cell to calculate time.
    By Lee in forum Excel General
    Replies: 3
    Last Post: 03-16-2006, 05:55 AM
  8. Formatting a date/time cell
    By Frank D. Nicodem, Jr. in forum Excel General
    Replies: 1
    Last Post: 10-04-2005, 03: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