Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
crck_whr
 
Posts: n/a
Default cell that accepts a whole number or five place deciaml

Is there a way to format a cell so that if you enter a whole number it stays
the way it was entered byt if you enter a decimal it gives the number five
decimal places? I have tried using general cell formatiing but this drops
zeros from the end and I need them to be displayed.
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
AFAIK there's no such format. This would either require VBA (using an event
procedure) or a separate cell with a helper formula (which would be difficult
for trainling zeros though)

"crck_whr" wrote:

Is there a way to format a cell so that if you enter a whole number it stays
the way it was entered byt if you enter a decimal it gives the number five
decimal places? I have tried using general cell formatiing but this drops
zeros from the end and I need them to be displayed.

  #3   Report Post  
K.S.Warrier
 
Posts: n/a
Default

Hi,
Suppose you have the number with decimals in cell A1.Then in B1 ,first
format the cell to 5 decimals & then,write
=if(mod(A1,1)=0,int(A1),A1) which will give you the desired result.This
may be repeated in other cells also.
Thank you,
K.S.Warrier

"crck_whr" wrote:

Is there a way to format a cell so that if you enter a whole number it stays
the way it was entered byt if you enter a decimal it gives the number five
decimal places? I have tried using general cell formatiing but this drops
zeros from the end and I need them to be displayed.

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
I need to increase a number which is held in a cell by 1 Steve New Users to Excel 1 January 14th 05 01:07 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 08:18 AM
#VALUE in cell but pop up function box show right number Ted Dalton Excel Discussion (Misc queries) 1 December 14th 04 04:15 PM
Can I place visible text in cell that won't print JB Excel Discussion (Misc queries) 2 December 7th 04 11:31 PM
returning a text cell based on a number cell Josh7777777 Excel Worksheet Functions 2 November 2nd 04 08:42 PM


All times are GMT +1. The time now is 09:09 AM.

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"