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
738 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now