Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Two digit number with one decimal, or three digit number

I would like to have one decimal point in a number, unless the number is 100
in order to fit the columns in a table. So, three digits for whatever number
I type in, and if it is two digits, to have a decimal.

95.6
45.2
80.0
100 - NOT 100.0
123 - NOT 123.0

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Two digit number with one decimal, or three digit number

Custom Format:

[<100]0.0;0


"Cass1930" wrote:

I would like to have one decimal point in a number, unless the number is 100
in order to fit the columns in a table. So, three digits for whatever number
I type in, and if it is two digits, to have a decimal.

95.6
45.2
80.0
100 - NOT 100.0
123 - NOT 123.0

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default Two digit number with one decimal, or three digit number

From the Format Cells window, on the Number tab, select Custom. In the Type
box enter
[<100]0.0;0
This says for anything less than 100 display at least one character for the
whole number and exactly one decimal character; otherwise, display the whole
number.

-- Brad E.


"Cass1930" wrote:

I would like to have one decimal point in a number, unless the number is 100
in order to fit the columns in a table. So, three digits for whatever number
I type in, and if it is two digits, to have a decimal.

95.6
45.2
80.0
100 - NOT 100.0
123 - NOT 123.0

Thanks!

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 to validate a cell to insert from 9 digit number to 13 digit number. ramulu via OfficeKB.com Excel Worksheet Functions 1 February 21st 07 02:32 PM
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu Excel Worksheet Functions 1 February 21st 07 10:00 AM
How do I stop decimal being placed in a 3 digit whole number Jhawk Setting up and Configuration of Excel 4 August 31st 06 02:03 AM
Color a single digit in a mult-digit number cell Phyllis Excel Discussion (Misc queries) 6 November 17th 05 12:46 AM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM


All times are GMT +1. The time now is 03:48 PM.

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

About Us

"It's about Microsoft Excel"