![]() |
Importing number with dash changes to date
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 |
Importing number with dash changes to date
When you import the data (either programmatically or manually), tell Excel
that the field is Text. That way, no conversion will take place. -- Gary''s Student - gsnu201001 "Dee Sperling" wrote: 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 |
Importing number with dash changes to date
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 "Dee Sperling" wrote in message ... An Excel spreadsheet is being exported from a SQL database that I cannot change, so I need to accomplish this in Excel. Sometimes, some of the many numbers contain a dash which Excel then interprets as a date. I can remove the dash programatically, but the number is not correct afterwards. For example, the number imported is 05-9078 which is displayed in Excel as May-78, but is actually stored as 5/1/9078. Changing the cell format to number or text gives me 2621833. I need to be able to add to my macro something that will give me back the original number so that I can remove the dash and end up with 059078 Any help greatly appreciated. Dee "Dee Sperling" wrote in message ... 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 |
Importing number with dash changes to date
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 "Dee Sperling" wrote in message ... 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 |
Importing number with dash changes to date
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 "Dee Sperling" wrote in message ... 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 |
All times are GMT +1. The time now is 02:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com