# Excel whole numbers change to decimals



## robrey (May 9, 2005)

(My first post)

I have a basic Excel spreadsheet that I use as an order form.

When I type a whole number into the quantity box and hit enter, it transforms into a two-place decimal number:

1 becomes .01
5 becomes .05

This happens no matter how many times I try to reformat the cell. It happens if I open Word and insert a spreadsheet into a document.

Something simple, or supernatural?

Thanks,
Rich


----------



## Tushman (Nov 10, 2002)

Robrey,

Is this a new document you're working on or is it a file that someone sent you? VBA code embedded in the document could do something like this. If you right click on the tab in the excel sheet, you'll see 'View code' which will allow you to view any macros or VBA code contained in the spreadsheet.


----------



## robrey (May 9, 2005)

Thanks for the quick help.

It's a document I created myself. If I simply open a new Excel file and make no changes to it - just type in a whole number - it does the same conversion.

I checked the VBA tab as you suggested, and while I don't understand it, it appears to be just default settings.



Tushman said:


> Robrey,
> 
> Is this a new document you're working on or is it a file that someone sent you?


----------



## Tushman (Nov 10, 2002)

Robrey, try typing a ' in front of the number first.

For example, if the number is 120, type '120 into the cell.


----------



## robrey (May 9, 2005)

That makes the problem go away. Can you tell me what it's doing?


----------



## kiwiguy (Aug 17, 2003)

Its a setting that is wrong.
Tools - Options - Edit

Uncheck "Fixed Decimal Places"

Tushmans solution changes the number to text and could cause problems if you use calculations.


----------



## Tushman (Nov 10, 2002)

kiwiguy said:


> Tushmans solution changes the number to text and could cause problems if you use calculations.


Yes I'm aware my suggestion changes it to text. I had the original poster try that to see if it was truly a number/formatting issue or a VBA code linked to the spreadsheet.


----------



## robrey (May 9, 2005)

I'm all set; I don't know how the "fixed decimal places" box got checked, but it's off now.

Thanks for the help!


----------

