Change date from UK to US for one spreadsheet

L

Lauren

Our dates are set to US but I've received a spreadsheet from one of our UK
offices with dates formatted as d/m/y and I need them in US format.

How can I do this on the spreadsheet only?
 
G

Gary''s Student

Try this small macro:

Sub format_fixer()
For Each r In ActiveSheet.UsedRange
If r.NumberFormat = "d/m/yyyy" Then
r.NumberFormat = "m/d/yyyy"
End If
Next
End Sub
 
B

Bob Phillips

d/m/y is US format.

It shouldn't matter, Excel should manage it unless they are text.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
B

Bob Phillips

Scrub the comment about d/m/y being US format, but the other part is meant.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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