Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sam
 
Posts: n/a
Default 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   Report Post  
Max
 
Posts: n/a
Default

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 <atyahoo<dotcom
----
"Sam" wrote in message
...
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   Report Post  
Sam
 
Posts: n/a
Default



"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!
  #4   Report Post  
Max
 
Posts: n/a
Default

"Sam" 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 <atyahoo<dotcom
----


  #5   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

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 wrote in message
...
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!





  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

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
  #7   Report Post  
 
Posts: n/a
Default

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I format charge card numbers? tspraetz Excel Discussion (Misc queries) 1 July 21st 05 01:23 PM
Checking Winning Numbers in the Lottery. Ann Excel Discussion (Misc queries) 4 May 18th 05 10:55 AM
Cell will not format numbers correctly for a 13 digit custom barc. Laudan Excel Worksheet Functions 4 April 11th 05 08:13 PM
Pasting numbers and formulas without pasting format. Dan Excel Discussion (Misc queries) 3 March 27th 05 03:47 AM
Converting numbers to date format from csv files FiBee Excel Discussion (Misc queries) 1 January 12th 05 01:30 PM


All times are GMT +1. The time now is 02:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"