long numbers changing in .csv file when file is opened

philip121

New Member
Joined
May 22, 2014
Messages
13
Office Version
  1. 365
Platform
  1. MacOS
I have a problem that is driving me crazy...

I have a .csv file that I exported from a sql database. One of the columns contains customer account numbers. Most of which are 16 digits long. Some are shorter.
The majority of the account numbers follow this format.
1200000000000167

The problem is that once I open the .csv file in Excel. The account numbers change to something like this.
[TABLE="width: 133"]
<tbody>[TR]
[TD="width: 133, align: right"]1.2E+15[/TD]
[/TR]
</tbody>[/TABLE]

I've tried all kinds of formats and none of them seem to work properly.
I am able to change it to a 16 digit number. But, the number isn't correct, it changes the number. It turns out like this.
1200000000000060

Any assistance would be greatly appreciated.
Thanks,

[TABLE="width: 147"]
<tbody>[TR]
[TD="class: xl65, width: 147, align: right"]Philip
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Use the Data import > From Text feature rather than directly opening the CSV file.

You may want to treat that column as Text rather than a Numeric since it is so long, I assume you don't need to do math with it.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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