Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Date format problem following cut/paste from Access

Good Morning All!

I have the following problem:
After pasting a range of data with a column that contains dates, the date
format does not get taken in consideration until the data in the field is
actually edited.
For example, I can select the column, and apply a date format (let's say
dd-mmm-yyyy) but the data will still look the same on screen. If I then
double-click on a cell in the range, and then move away from that cell, it
then takes the format I specified.

Forcing a recalculation wiht F9 doesn't change that.

If I select the range and force a General format on it, I can see that the
undelying data is a date (and not text), sorting it produces correct results
(showing that Excel interprets that column as a date).

Does anybody know if the Office SP3 solves that problem, I couldn't figure
that out with the description of the changes in SP3 in the KB.

Thanks in advance for the help.

Daniel :-)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Date format problem following cut/paste from Access

Hi
one workaround. use the following macro (processes the selected area):
sub foo()
dim rng as range
set rng = selection
rng.value=rng.value
end sub

"Daniel Carollo" wrote:

Good Morning All!

I have the following problem:
After pasting a range of data with a column that contains dates, the date
format does not get taken in consideration until the data in the field is
actually edited.
For example, I can select the column, and apply a date format (let's say
dd-mmm-yyyy) but the data will still look the same on screen. If I then
double-click on a cell in the range, and then move away from that cell, it
then takes the format I specified.

Forcing a recalculation wiht F9 doesn't change that.

If I select the range and force a General format on it, I can see that the
undelying data is a date (and not text), sorting it produces correct results
(showing that Excel interprets that column as a date).

Does anybody know if the Office SP3 solves that problem, I couldn't figure
that out with the description of the changes in SP3 in the KB.

Thanks in advance for the help.

Daniel :-)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Date format problem following cut/paste from Access

Hello Frank!

First of all, thank you very much for your prompt answer.

I'm sure your workaround does work, as I did something similar to validate
my initial assumption and confirm it was indeed an Excel bug:
Dim c As Range, p As Range
Set p = Range(Range("A2"), Range("A2").End(xlDown))
For Each c In p.Cells
c.Value = CDate(c.Value)
Next c
Set p = Nothing

However, the issue still remains to find out whether this bug gets corrected
in SP3 or not, as there are a fair number of users around me that would not
be able to use your workaround.

Regards.

Daniel :-)

"Frank Kabel" wrote:

Hi
one workaround. use the following macro (processes the selected area):
sub foo()
dim rng as range
set rng = selection
rng.value=rng.value
end sub

"Daniel Carollo" wrote:

Good Morning All!

I have the following problem:
After pasting a range of data with a column that contains dates, the date
format does not get taken in consideration until the data in the field is
actually edited.
For example, I can select the column, and apply a date format (let's say
dd-mmm-yyyy) but the data will still look the same on screen. If I then
double-click on a cell in the range, and then move away from that cell, it
then takes the format I specified.

Forcing a recalculation wiht F9 doesn't change that.

If I select the range and force a General format on it, I can see that the
undelying data is a date (and not text), sorting it produces correct results
(showing that Excel interprets that column as a date).

Does anybody know if the Office SP3 solves that problem, I couldn't figure
that out with the description of the changes in SP3 in the KB.

Thanks in advance for the help.

Daniel :-)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Date format problem following cut/paste from Access

Hi
this is not a bug but just a behaviour of importing data. How should
Excel know that you really want date values and not 'Text' values. If
Excel would do it the other way round I'm sure that other people would
complain about this behaviour as well

That said: An option to control this would be great :-))

--
Regards
Frank Kabel
Frankfurt, Germany

"Daniel Carollo" <Daniel schrieb im
Newsbeitrag ...
Hello Frank!

First of all, thank you very much for your prompt answer.

I'm sure your workaround does work, as I did something similar to

validate
my initial assumption and confirm it was indeed an Excel bug:
Dim c As Range, p As Range
Set p = Range(Range("A2"), Range("A2").End(xlDown))
For Each c In p.Cells
c.Value = CDate(c.Value)
Next c
Set p = Nothing

However, the issue still remains to find out whether this bug gets

corrected
in SP3 or not, as there are a fair number of users around me that

would not
be able to use your workaround.

Regards.

Daniel :-)

"Frank Kabel" wrote:

Hi
one workaround. use the following macro (processes the selected

area):
sub foo()
dim rng as range
set rng = selection
rng.value=rng.value
end sub

"Daniel Carollo" wrote:

Good Morning All!

I have the following problem:
After pasting a range of data with a column that contains dates,

the date
format does not get taken in consideration until the data in the

field is
actually edited.
For example, I can select the column, and apply a date format

(let's say
dd-mmm-yyyy) but the data will still look the same on screen. If

I then
double-click on a cell in the range, and then move away from that

cell, it
then takes the format I specified.

Forcing a recalculation wiht F9 doesn't change that.

If I select the range and force a General format on it, I can see

that the
undelying data is a date (and not text), sorting it produces

correct results
(showing that Excel interprets that column as a date).

Does anybody know if the Office SP3 solves that problem, I

couldn't figure
that out with the description of the changes in SP3 in the KB.

Thanks in advance for the help.

Daniel :-)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy paste format problem Cherie New Users to Excel 2 April 23rd 07 12:08 AM
Problem with the format of cells after impoting from Access Siuan Excel Discussion (Misc queries) 2 July 18th 06 01:14 PM
Date Format Issues Access to Excel RC Excel Discussion (Misc queries) 3 June 13th 06 11:28 AM
How to get only the year in the date format in Access yanu New Users to Excel 1 January 10th 05 03:50 AM
cut and paste format problem Francis Hayes (The Excel Addict) Excel Discussion (Misc queries) 1 December 7th 04 02:23 PM


All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"