American date conversion Macro

G

Guest

Does anyone have some simple code (not formula) that I can use to convert
American date format to English format. eg. 12/25/06 to 25/12/06. It will
have to take into account single and double digits. I then want to be able to
attach the macro to a button for quick conversion.

Cheers,
Ant.
 
N

NickHK

Are the values actually dates or text ?
If dates, record a macro whilst you perform the change in
Format>Cells>Number.
If on XL2002 and later, maybe the date formats marked "*" will be useful. I
understand they do not change with differences in Windows Regional Settings.

If text, look into DateSerial and build your new date from the old.

Not sure what you mean by "take into account single and double digits".

NickHK
 

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

Top