Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Excel Date Problem

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.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Excel Date Problem

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

See answer in other newsgroup

--
Kind regards,

Niek Otten

"Always Learning" <NoMoreSpam@MyEmail wrote in message
...
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.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Excel Date Problem

Niek Otten wrote:

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.


--
Gordon Rainsford

London UK
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Excel Date Problem

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.

"Gordon Rainsford" wrote in message
news:1h8lh5l.1h2kddapplefkN%grbridgeREMOVETHIS@bti nternet.com...
Niek Otten wrote:

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.


--
Gordon Rainsford

London UK



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Excel Date Problem

microsoft.public.excel

--
Kind regards,

Niek Otten

"Gordon Rainsford" wrote in message
news:1h8lh5l.1h2kddapplefkN%grbridgeREMOVETHIS@bti nternet.com...
Niek Otten wrote:

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.


--
Gordon Rainsford

London UK



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
Excel VBA - SQL to .dbf date problem - GETTING DESPERATE Erasmus Excel Discussion (Misc queries) 6 July 2nd 07 05:20 PM
date problem in excel arindamkol_1978 Excel Worksheet Functions 4 July 15th 06 08:56 AM
VBA, Excel Date Problem [email protected] Excel Programming 1 October 10th 05 11:25 PM
excel date problem Saiju Mammen Excel Worksheet Functions 2 August 15th 05 01:25 PM
date problem in excel Wozniak Excel Discussion (Misc queries) 5 August 6th 05 11:39 AM


All times are GMT +1. The time now is 05:35 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"