+ Reply to Thread
Results 1 to 7 of 7

Is there a way to only format numbers that have digitsafter decima

  1. #1
    Sam
    Guest

    Is there a way to only format numbers that have digitsafter decima

    Hello,

    I have a table where each column heading is a year. The numbers in the
    table display 5 places after the decimal point. When I select all and format
    the cells as a Number with only 3 decimal places, the years in the column
    headings are also displayed with the three decimal places, like this:

    1990.000 1991.000
    13.478 13.902

    How can I only format the numbers that already have places after the decimal
    point - i.e.
    Before
    1990 <- doesn't have decimal places
    13.47895 <- has places after the decimal point

    Thanks you!

  2. #2
    Max
    Guest

    Re: Is there a way to only format numbers that have digitsafter decima

    Either don't select the col headers in the first instance, or, if entire
    sheet already formatted to 3 dp, just re-select the col headers row and
    re-format to zero dp.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Sam" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I have a table where each column heading is a year. The numbers in the
    > table display 5 places after the decimal point. When I select all and

    format
    > the cells as a Number with only 3 decimal places, the years in the column
    > headings are also displayed with the three decimal places, like this:
    >
    > 1990.000 1991.000
    > 13.478 13.902
    >
    > How can I only format the numbers that already have places after the

    decimal
    > point - i.e.
    > Before
    > 1990 <- doesn't have decimal places
    > 13.47895 <- has places after the decimal point
    >
    > Thanks you!




  3. #3
    R.VENKATARAMAN
    Guest

    Re: Is there a way to only format numbers that have digitsafter decima

    dont highlight the whole column. Try highlighting only those cells which
    you want to change the format (not the cell having year value) and then
    format


    Sam <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I have a table where each column heading is a year. The numbers in the
    > table display 5 places after the decimal point. When I select all and

    format
    > the cells as a Number with only 3 decimal places, the years in the column
    > headings are also displayed with the three decimal places, like this:
    >
    > 1990.000 1991.000
    > 13.478 13.902
    >
    > How can I only format the numbers that already have places after the

    decimal
    > point - i.e.
    > Before
    > 1990 <- doesn't have decimal places
    > 13.47895 <- has places after the decimal point
    >
    > Thanks you!




  4. #4
    Dave Peterson
    Guest

    Re: Is there a way to only format numbers that have digitsafter decima

    If you can live with "1990.", you could use a number format of:

    0000.###

    It'll show:

    1990.
    1900.1
    1900.23
    1900.345

    depending on the number of decimal places used.

    If you absolutely can't have a decimal point for the whole number, you can do it
    manually or run a macro:

    If those values don't change (since they're headers), I gotta believe selecting
    all those cells and changing them once would be the easiest way.



    Sam wrote:
    >
    > Hello,
    >
    > I have a table where each column heading is a year. The numbers in the
    > table display 5 places after the decimal point. When I select all and format
    > the cells as a Number with only 3 decimal places, the years in the column
    > headings are also displayed with the three decimal places, like this:
    >
    > 1990.000 1991.000
    > 13.478 13.902
    >
    > How can I only format the numbers that already have places after the decimal
    > point - i.e.
    > Before
    > 1990 <- doesn't have decimal places
    > 13.47895 <- has places after the decimal point
    >
    > Thanks you!


    --

    Dave Peterson

  5. #5
    Sam
    Guest

    Re: Is there a way to only format numbers that have digitsafter de



    "Max" wrote:

    > Either don't select the col headers in the first instance, or, if entire
    > sheet already formatted to 3 dp, just re-select the col headers row and
    > re-format to zero dp.


    I have 72 of these tables on 36 pages...
    Is there any other way to do this? Thanks!

  6. #6
    Max
    Guest

    Re: Is there a way to only format numbers that have digitsafter de

    "Sam" <[email protected]> wrote:
    > I have 72 of these tables on 36 pages...
    > Is there any other way to do this? Thanks!


    Think it's a one-off, but manual task. But if the tables are all identical
    in structure with col headers in say, row1 with another in say, row50 in
    each sheet, we could try grouping the sheets and do it all at one go. Try
    something along these lines on a spare copy of your file

    Select the leftmost sheet, say Sheet1

    While holding down SHIFT, scroll to / select the rightmost sheet, say
    Sheet36. This will group all the 36 sheets (all sheet tabs will appear
    highlighted)

    Select row1 (click on the row header)
    Hold down CTRL and select row50
    (this will select both rows 1 and 50)
    Click to format to zero dp as per normal

    Finally, do a right-click on any sheet tab > choose "Ungroup Sheets"
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  7. #7

    Re: Is there a way to only format numbers that have digitsafter decima

    > the cells as a Number with only 3 decimal places, the years in the
    column
    > headings are also displayed with the three decimal places, like this:
    >
    > 1990.000 1991.000
    > 13.478 13.902
    >
    > How can I only format the numbers that already have places after the

    decimal

    Do the numbers have a maximum lower than the years?
    eg years start at 1990 and largest number 1989.999

    if so try this custom number format
    [<1990]0.000;General

    I hope this is the case otherwise it's a lot of work.

    hth RES

+ 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