Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Excel Dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Always Learning - 03 Jan 2006 13:36 GMT
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.
Niek Otten - 03 Jan 2006 13:42 GMT
Hi Steve,

="Date Reported: "&TEXT(A1,"dd mmm yyyy")

Signature

Kind regards,

Niek Otten

> Hi Guys,
>
[quoted text clipped - 22 lines]
>
> Steve Wilson.
Always Learning - 03 Jan 2006 14:12 GMT
Hi Niek,
Sorry about cross posting it's because I needed a quick answer.

I keep getting an error on the "&TEXT(A1,"dd mmm yyyy") saying sub or
function unknown. Is this because I am doing this in VBA?
The actual piece of code I am trying to use is:
       HoldPrevYearDate = "Previous Year: " & Text(A1, "dd mmm yyyy")

Any ideas?

Thanks for your help,

Steve Wilson.

> Hi Steve,
>
[quoted text clipped - 26 lines]
> >
> > Steve Wilson.
Dave Peterson - 03 Jan 2006 14:46 GMT
And if you really needed VBA, you could use:

Dim HoldPrevYearDate As String

HoldPrevYearDate = "Previous Year: " _
& Format(activeworkbook.worksheets("sheet99").range("a1").value, "dd mmm yyyy")

> Hi Niek,
> Sorry about cross posting it's because I needed a quick answer.
[quoted text clipped - 48 lines]
> > >
> > > Steve Wilson.

Signature

Dave Peterson

Roger Govier - 03 Jan 2006 13:44 GMT
Hi

Try
="Date Reported  :  "&TEXT(A1,"dd mmm yyyy")

Signature

Regards

Roger Govier

> Hi Guys,
>
[quoted text clipped - 17 lines]
>
> Steve Wilson.
Always Learning - 03 Jan 2006 13:54 GMT
Hi Guys,

That's perfect.

Thanks for the quick response I really appreciate it.

Happy new year.

All the best,

Steve Wilson.

> Hi Guys,
>
[quoted text clipped - 17 lines]
>
> Steve Wilson.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.