+ Reply to Thread
Results 1 to 7 of 7

number format of ##0.0E+0 but don't display the E in cell.

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    number format of ##0.0E+0 but don't display the E in cell.

    I have some numbers in Killograms which need to remain in Killograms for other formalas that use these values however I would like excel to display the values in grams (which normally would be .01Kg = 10.0E-3 grams) but without displaying the E value at the end. so 0.1 would be displayed as 100.

    anyone know how to do that in a number format (if it's possible)?

    I can display 3 grams in Kg using format {0.###,} and the value still counts as 3 for equations, I just can't figure out how to do it the other way around.
    Last edited by Leon V (AW); 07-07-2014 at 06:05 AM. Reason: more info
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: number format of ##0.0E+0 but don't display the E in cell.

    Select the cells you wish to format and run this:

    Please Login or Register  to view this content.
    Gary's Student

  3. #3
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: number format of ##0.0E+0 but don't display the E in cell.

    that sort of works however the only way to keep the values up to date is to have it run on the range as part of a sheetchange sub and I need the workbook to remain macro free.
    I can display the correct number with the format 0,%%% but it shows the damn % characters at the end.
    Last edited by Leon V (AW); 07-07-2014 at 05:10 AM.

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

    Re: number format of ##0.0E+0 but don't display the E in cell.

    Available number format codes: http://office.microsoft.com/en-us/ex...372.aspx?CTT=1 The comma can be used to scale numbers by 10^3 -- as you noted, it easily formats 3000 (g) as 3 (kg) (format code 0,). I have often wished for a code that will do the opposite (display a value of 3 (kg) as 3000 (g)), but I do not think Excel will do it. The closest I have found is to use some kind of scientific/engineering format -- and even that is not a perfect solution.

    In short, exactly what you want cannot be acheived (to my knowledge) by number formatting alone. The imperfect number formats you have already suggested are the only ways I know of to do what you want. The only other suggestion I can make is to store the "kg" number somewhere out of the way (hidden maybe?) and use that cell in calculations. Where you want the kg number displayed as g, you can then have a formula =cellref*1000.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: number format of ##0.0E+0 but don't display the E in cell.

    Quote Originally Posted by Leon V (AW) View Post
    that sort of works however the only way to keep the values up to date is to have it run on the range as part of a sheetchange sub and I need the workbook to remain macro free.
    I can display the correct number with the format 0,%%% but it shows the damn % characters at the end.
    Hi

    Well, if you don't want to see the % characters, one option is to send then to a second line that you don't display. Not a perfect solution, but it works.

    If you want to try it, enter in the custom format box

    0,%%%

    place the cursor between the comma and the first % and press CTRL-J. Then press OK.

    Set the cell format to Wrap Text. Keep the row height to display just 1 line. This gets you the multiply by 1000 that you want.

    As I said, not a perfect solution.

  6. #6
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: number format of ##0.0E+0 but don't display the E in cell.

    Is it possible to fix a custom font (character set) to a workbook? maybe I could creat a font with a blank % character.

  7. #7
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: number format of ##0.0E+0 but don't display the E in cell.

    Hi

    I've done this using a modified font before and it works fine but, unfortunately, there's no easy way to embed a font in Excel. This means you'd have to install the font in windows which may not be practical if you want to share the spreadsheet.
    As you may know this would not be a problem in Word, where you can save a document with the fonts embedded.

    Remark: I'm using Office 2010. I guess that this may not be a problem in some future version.

+ 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] Set Cell To Display Number(s) Entered In Four-Digit Format
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-29-2012, 12:59 PM
  2. Replies: 4
    Last Post: 03-30-2010, 08:41 PM
  3. Cell Number format and display - Excel 2003
    By annieb in forum Excel General
    Replies: 3
    Last Post: 12-02-2009, 06:34 PM
  4. Excel 2007 : Display Pivot number is x.xM format
    By Allieanne in forum Excel General
    Replies: 2
    Last Post: 06-18-2009, 10:30 AM
  5. [SOLVED] display:Custom Number Format
    By GregR in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2005, 07: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