Help Please - Decimal Points Rnding Off

nancybrown

Well-known Member
Joined
Apr 7, 2005
Messages
868
I'm importing an excel spreadsheet that has a field formatted for 5 decimal places, e.g., 1.31758.

When importing into Access, it is rounding down, e.g., 1. What do I need to do to stop this? I need field to display exactly as is without round . . . and 5 decimal places.

Regards,
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
It sounds like you have the receiving table field set to a number type that only includes whole numbers (like Integer). Try changing it to something that accepts decimal places.

Does that help?
 
Upvote 0
Hi Ron,

The receiving table is set to number type with long integer as the field size. I attempted to change the field size to "decimal," as well as changing the field type to text . . . am receiving an error message "not enough disk space or memory." What kind of trouble am I in now? :(
 
Upvote 0
There may be something to be learned by trying to import the data into a new table (created upon import).
Does that execute without incident?
 
Upvote 0
I find it easier to do what Ron suggested. Additionally, I find that you have more control over the importation if you convert your excel file to .csv file. You can then pick and choose how you want each field to be formatted upon import rather than let Access guess. If this is going to be a repeat excercise, then do it the first time manually and save the specification so you can do the same over and over again.

Alan
 
Upvote 0
The receiving table is set to number type with long integer as the field size
Integers do not allow decimals! You will need to choose another Field Size option, such as Decimal, Single, or Double.

Try Double, as that is one of that should allow the most possibilities.

. am receiving an error message "not enough disk space or memory."
How much data are you trying to import?
What is the size of your database?
 
Upvote 0
Gentlemen, thanks for your patience. I think there is a misunderstanding of my issue.
My data has already been imported successful. The problem I'm faced with is that the decimal field is displaying as either rounded up or rounded down . . . instead of 1.38592 it is rounding down to 1.00000 or if 1.59983 is rounding up to 2.

I understand now that the field size should be "double," however, when I attempt to make that change and save is when I am getting the "not enough memory" and will not let me make the change.
 
Upvote 0
If the data has already been imported, it is too late to make the change on the existing data, it was rounded off upon import and is stored in the table rounded off, so you lost all decimal precision on any existing data.

In order to keep the decimals, you will need to re-import your data. If you are importing into a new table, you will need to specify one of those other Field Size Options as you create the table upon import. If importing into an existing table, you will need to change the Field Size option first before importing.

If you are running into errors on trying to change that Field Size option, try Compacting & Repairing the database first. If that still doesn't work, you may need to create a new table instead of trying to alter an existing one. If that works, you can always move data from the old table to the new table via an Append Query (though your old table data probably has the rounded off values you don't want, so I don't think you want that anyway).
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top