+ Reply to Thread
Results 1 to 5 of 5

Special format a cell

  1. #1
    Registered User
    Join Date
    03-11-2015
    Location
    Brutus, MI
    MS-Off Ver
    2013
    Posts
    8

    Special format a cell

    I want to format a cell so that when you enter a swimming time of 2minutes 10.45 seconds it shows up as either: 2:10.45 or 2 min 10.45 sec in the cell. Can't get the right special format code. Thanks in advance.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Special format a cell

    Format the cell as m:ss.00

    You'll still have to enter the time as h:m:ss.00

    For example, type in:

    0:2:10.45

    The cell will display as 2:10.45
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    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,938

    Re: Special format a cell

    A variation on Tony's...
    mm "min" ss.00 "sec"
    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

  4. #4
    Registered User
    Join Date
    03-11-2015
    Location
    Brutus, MI
    MS-Off Ver
    2013
    Posts
    8

    Re: Special format a cell

    This is what I found out. Thanks for your post though. #"min" ##"."##"sec"
    when I enter 12345 only it shows as 1min23.45sec

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Special format a cell

    hi there reno. if you wish to type "2minutes 10.45 seconds" & return those, you need either a formula in another cell OR VBA. format cells will not help you. you would have to take Tony's or FDibbins' suggestion to type as such:
    0:2:10.45

    type in 1jan2013 in A1. and 12 pm in B1. Format both cells to General. you will see that A1 is 41275 (meaning 41,275th day from 1 Jan 1900) & B1 is 0.5 (1/2 a day). so when you didn't follow their suggestion & use #"min" ##"."##"sec", the formatting simply splits your whole number into:
    #"min" ##"."##"sec"

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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] Addition to code to copy and pastes special values and cell format, but not links.
    By singerbatfink in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-13-2014, 03:10 PM
  2. [SOLVED] if a cell has a special value, the whole row should get to a special spreadsheet
    By benjamin.grimm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-08-2013, 09:50 AM
  3. Replies: 8
    Last Post: 12-17-2012, 05:30 AM
  4. [SOLVED] Excel needs a special cell format for MAC addresses
    By Don in forum Excel General
    Replies: 0
    Last Post: 07-20-2006, 09:20 AM
  5. [SOLVED] Special format for feet - inches in a cell
    By Bothell John in forum Excel General
    Replies: 1
    Last Post: 09-07-2005, 09: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