Discussion:
Why this paste result?
(too old to reply)
Terry Pinnell
2014-10-09 10:35:03 UTC
Permalink
I have a text file containing lines
3-01
3-02
3-03
etc

On copy/pasting these into an empty column (in Excel 2002) they were
displayed as

03-Jan
03-Feb
03-Mar
etc

First, I don't really understand why. That column was not formatted
for dates. More important, I don't see why specifying General or Text
doesn't now get them displayed correctly?

Any advice would be appreciated please.
--
Terry, East Grinstead, UK
Claus Busch
2014-10-09 10:46:55 UTC
Permalink
Hi Terry,
Post by Terry Pinnell
I have a text file containing lines
3-01
3-02
3-03
etc
On copy/pasting these into an empty column (in Excel 2002) they were
displayed as
03-Jan
03-Feb
03-Mar
etc
3-01 is the short style to write a date.
Format your cells as text before pasting or open Excel => Data =>
External Data from Text and choose in the 3. step of the assistent for
the expected column the format "Text"


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
Terry Pinnell
2014-10-10 06:01:48 UTC
Permalink
Post by Claus Busch
Hi Terry,
Post by Terry Pinnell
I have a text file containing lines
3-01
3-02
3-03
etc
On copy/pasting these into an empty column (in Excel 2002) they were
displayed as
03-Jan
03-Feb
03-Mar
etc
3-01 is the short style to write a date.
Format your cells as text before pasting or open Excel => Data =>
External Data from Text and choose in the 3. step of the assistent for
the expected column the format "Text"
Regards
Claus B.
Thanks both, appreciate the fast replies.
--
Terry, East Grinstead, UK
GS
2014-10-09 10:50:41 UTC
Permalink
Post by Terry Pinnell
I have a text file containing lines
3-01
3-02
3-03
etc
On copy/pasting these into an empty column (in Excel 2002) they were
displayed as
03-Jan
03-Feb
03-Mar
etc
First, I don't really understand why. That column was not formatted
for dates. More important, I don't see why specifying General or Text
doesn't now get them displayed correctly?
Any advice would be appreciated please.
Cell format is 'General' by default and so Excel interprets input as
such. Since your text is valid 'date' format in Excel, it gets
interpreted as a date.

When Excel pastes text into a cell already formatted as text then it
displays same as in the text format. Changing cell format *after*
pasting does nothing. Setting cell format to 'Text' *before* pasting
results in what you want.
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
GS
2014-10-09 12:21:16 UTC
Permalink
Since your OS is XP (or earlier), the system date format (default)
is...

d-m-y

On later OSs, this has been changed to...

m-d-y

Note that year is assumed as the current calendar year.
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Loading...