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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

707 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

12 Experts available now in Live!

Get 1:1 Help Now