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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

821 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