Thread
:
Changing the date in a cell
View Single Post
#
15
Posted to microsoft.public.excel.misc
Sandy Mann
external usenet poster
Posts: 2,345
Changing the date in a cell
Hi Dave,
No it remained the same.
Thinking that it may be because I had British Date format set I changed
Regional Option in the Regional and Language to English (United States), the
Short date format to mm/dd/yy and the Long date format to mm/dd/yyyy
Still the same.
Thinking that it may be because VBA is American date format eccentric I
changed Gord's code to:
Selection.NumberFormat = "mmm-dd-yyyy"
Still the same.
I closed and opened XL - still the same.
I closed & opened Windows - still the same.
Changed Gord's code back to what it was origially - still the same
The sun shine for other people.......... <g
Were you testing it in XL97?
--
Regards,
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
Replace @mailinator.com with @tiscali.co.uk
"Dave Peterson" wrote in message
...
It changed for me in my short tests.
I wonder what happens if you update the display (scroll up/down)?
Or even save, close and reopen the workbook?
Gord Dibben wrote:
To add to this, if you run this macro on the cell with 39542 the value
does not
change in the formula bar but will take the format in the cell.
Sub DateFormat()
Selection.NumberFormat = "dd-mmm-yyyy"
End Sub
Curious.
Gord
On Sat, 5 Jan 2008 16:26:44 -0000, "Sandy Mann"
wrote:
If I enter 39452 in a cell and format it as Accounting I see £39,452.00
in
the cell but still simply 39452 in the formula bar. If I format the
cell as
a date I see 5 Jan 2008 in the cell and 05/01/2008 in the formula bar.
So I
am not simply seeing in the formula bar the number formatted to look
like a
date by the formatting I applied or the number that I enter
--
Dave Peterson
Reply With Quote
Sandy Mann
View Public Profile
Find all posts by Sandy Mann