+ Reply to Thread
Results 1 to 3 of 3

Custom Format to divide by 10

  1. #1
    Ailish
    Guest

    Custom Format to divide by 10

    Hi All

    I was wondering if you can create a custom format to divide by 10. As you
    know you can create a custom format for 1000 i.e. 0, and 1m i.e. 0,,. I was
    looking to do a similar style for this group of cells and I don't really want
    to use the Paste Special and Divide or linking to another cell to divide.

    Thanks
    Ailish

  2. #2
    Gary76
    Guest

    RE: Custom Format to divide by 10

    Can't think of way of formatting this - hopefully some other bright spark
    will...

    You could use a macro:

    ' -------------------
    Sub DivideBy10()
    Dim cel As Range
    For Each cel In Selection
    If cel.HasFormula = False Then
    cel.Value = cel.Value / 10
    End If
    Next
    End Sub
    '-------------

    although this would actually divide the values by 10.

    HTH anyway...

    "Ailish" wrote:

    > Hi All
    >
    > I was wondering if you can create a custom format to divide by 10. As you
    > know you can create a custom format for 1000 i.e. 0, and 1m i.e. 0,,. I was
    > looking to do a similar style for this group of cells and I don't really want
    > to use the Paste Special and Divide or linking to another cell to divide.
    >
    > Thanks
    > Ailish


  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819
    I've done some failry extensive looking for variations on the "," format code theme, and haven't found much. Best answer would depend a lot on your overall goals. Maybe some variation on this theme:

    Place the "real" values in column 1
    Column 2 then contains the formula =A1/10^n where n is the number of places you want the decimal moved.

    Calculations that need to reference the real values will reference column 1, and tables/reports that need to reference the displayed values will reference column 2. I know that the apparent redundancy seems irritating, but it's probably the simplest way to get what you want.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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