Solved

What is the meaning of a lead apostrophe in an Excel file cell that causes incorrect formatting when reading in the import Excel file?

Posted on 2014-09-24
2
809 Views
Last Modified: 2014-09-29
I am using Excel 2010.

In worksheet SampleA, I look at 1 cell, A14, and the value in the cell is 09/22/2014 and its correspoding value in the formula bar is 9/22/2014. If I look at Fomat Cells, under the Number tab, I see
Category: Customer
Type: mm/dd/yyyy

In the same workbook, in worksheet SampleB, I look at cell, A14, and the value in the cell is 09/22/2014 and its corresponding value in the formula bar is '09/22/2014. If I look at Format Cells, under the Number tab, I see:
Category: Customers
Type: mm/dd/yyyy

What causes the formula bar value in the 2nd worksheet to begin with 1 leading ' (apostrophe) before the date?

This leading apostrophe seems to be responsible for causing this particular records from being imported from an Excel record into a Sybase table. This record is bypassed for what seems to be a formatting error.
0
Comment
Question by:zimmer9
2 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40343237
I've never heard of being able to create a custom category name like "Customer" or "Customers."  I presume the category name is actually "Custom", right?  :-)

The leading apostrophe is forcing the date to appear as a string value instead of a date.   You can't do a search and replace on the apostrphes to remove them, but you could add a helper column to produce the date values and then replace those values on the original data.

Insert a temporary column in column B, then add the following formula in cell A2 and copy down:
=DATEVALUE (A2)

Then, copy and paste these values (Edit, Paste Special, Values) over the original data in column A.  Remove the helper column.  You should then be able to import this data into Sybase.

Regards,
-Glenn
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40343997
Or to convert in place, just select the data, then Data tab, Text to columns, Delimited, leave all options blank in step 2, and in the last step of the wizard choose Date (MDY) and Finish.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question