Excel Date Problem

  • Thread starter Thread starter Always Learning
  • Start date Start date
A

Always Learning

Hi Guys,

Can you help me with a little problem.

I am running a macro on a csv file.
There are 4 dates in the format dd/mm/yy and I format them to dd mmm yyyy.
So the cell A1 originally has the value 25/12/05, I format it so the cell A1
now has 25 Dec 2005
When I try to concatenate "Date Reported : " & A1. Instead of getting Date
Reported : 25 Dec 2005 I get Date Reported : 25/12/05 Cell A1 is back in
it's original format although on the screen it is showing as the new format
I.E. 25 Dec 2005

What is going on here? how do I get the cell to keep it's new format so when
I use the value from the cell it's the correct format.

Thanks for your help.

Best Regards,

Steve Wilson.
 
Please don't post to multiple groups in separate messages.

See answer in other newsgroup
 
Niek Otten said:
Please don't post to multiple groups in separate messages.

See answer in other newsgroup

This is an unfortunate approach for those of us who don't know what
other groups it has been posted to, but would have been interested in
the answer to the question.
 
Hi Gordon,

I also posted in the Microsoft.Public.Excel Group.

Got some good answers there too.
Main ones were
For VBA
HoldPrevYearDate = "Previous Year: " _
& Format(activeworkbook.worksheets("sheet99").range("a1").value, "dd
mmm yyyy")
For Excel
HoldPrevYearDate = "Date Reported: "&TEXT(A1,"dd mmm yyyy")


Best Regards,

Steve Wilson.
 
Back
Top