![]() |
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! |
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! |
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! |
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 |
"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! |
"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 ---- |
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 |
All times are GMT +1. The time now is 08:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com