Date formatting

  • Thread starter Thread starter Sandy
  • Start date Start date
S

Sandy

Excel 2003
I have dates in Cells B4 (10 March 2007) and F4 (20 October 2007).
Formatting is "dd mmmm yyyy".

I have, as part of a macro:-
Range("A1").Value = "You have selected rounds between '" & Range("B4") & _
"' and '" & Range("F4") & "'"

which produces:-
You have selected rounds between '10/03/2007' and '20/10/2007'

I would like it to read:-
You have selected rounds between '10 March 2007' and '20 October 2007'.

How can I adjust my code to produce this result?
Sandy
 
Sandy,

Try this

Range("A1").Value = "You have selected rounds between '" _
& Format(Range("B4"), "DD MMMM YY") & "' and '" & Format(Range("F4"), _
"DD MMMM YYYY") & "'"

Mike
 
Ah the parentheses make all the difference - I nearly had it.
Thank you very much Mike
Sandy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top