Importing number with dash changes to date

D

Dee Sperling

I'm imporint data (which I have no control over) into Excel. Some of the
number contain 2 digits, a dash, then 6 more digits, for ex 02-9098 Excel
interprets that number as Feb 1, 9098. Changing the cell format to number or
text does not get the original value back, instead, I get 2629049 which is
obviously not correct.

Is there a way to undo the date and get the original number back?

Thanks,
Dee Sperling
 
G

Gary''s Student

When you import the data (either programmatically or manually), tell Excel
that the field is Text. That way, no conversion will take place.
 
H

helene and gabor

Hello Dee,
Excel 2007:
I framed in a group of cells.Then: Home, Number, Format Cells and Text. Now
it was
possible to enter 05-9078 without it being turned into a date 7000 years
from now.

Best Regards,

Gabor Sebo
 
H

helene and gabor

Hello Dee,

Too bad that you can't have the data resent to you.
In that case you could format the receiving area of cells as: Text.
The closest that you could recover the original data is if you take the
Feb-98 ( entered as 02-9098) cell and format it as date.
The result then is: 2/1/9098 which may be programmed to become 02-9098.

Best regards,

Gabor Sebo
 
H

helene and gabor

hello Dee,

I have entered 02-9098 into A1
came out as: Feb-98
specified date for cell, came out as: 2/1/9098
month(a1)=2
day(a1)=1
year(a1)=9098
giving you your "2" and "9098".
Drop me a note if this does not help.

Gabor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top