Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need to increase a number which is held in a cell by 1 | New Users to Excel | |||
inserting data from a row to a cell, when the row number is specified by a formula in a cell | New Users to Excel | |||
#VALUE in cell but pop up function box show right number | Excel Discussion (Misc queries) | |||
Can I place visible text in cell that won't print | Excel Discussion (Misc queries) | |||
returning a text cell based on a number cell | Excel Worksheet Functions |