#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 390
Default Format date

Hello
I'm working on excel 2007 and I have a workbook with 15 sheets. The problem
is that the dates are all in English US and I want them in English UK. What
is the solution to change all the 15 sheets at once?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Format date

Group the sheets, then format cells.
Then ungroup the sheets to avoid confusion.
--
David Biddulph

MAX wrote:
Hello
I'm working on excel 2007 and I have a workbook with 15 sheets. The
problem is that the dates are all in English US and I want them in
English UK. What is the solution to change all the 15 sheets at once?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Format date

The following small macro:

Sub fixum()
Dim sh As Worksheet
Dim r As Range, rng As Range
For Each sh In Sheets
sh.Activate
Set rng = ActiveSheet.UsedRange
For Each r In rng
If r.NumberFormat = "m/d/yyyy" Then
r.NumberFormat = "d/m/yyyy"
End If
Next
Next
End Sub

will loop over all your sheets and change cell formatted like:
12/28/2009
to:
28/12/2009

You will need to modify the code if the original format differs from the
above.

I suggest using a different approach and use something like:
28 December 2009

This is easily understood no matter which side of the Atlantic you are
standing on.
--
Gary''s Student - gsnu200909


"MAX" wrote:

Hello
I'm working on excel 2007 and I have a workbook with 15 sheets. The problem
is that the dates are all in English US and I want them in English UK. What
is the solution to change all the 15 sheets at once?

Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 390
Default Format date

Thankyou for your useful information.

*HAPPY NEW YEAR*

"Gary''s Student" wrote:

The following small macro:

Sub fixum()
Dim sh As Worksheet
Dim r As Range, rng As Range
For Each sh In Sheets
sh.Activate
Set rng = ActiveSheet.UsedRange
For Each r In rng
If r.NumberFormat = "m/d/yyyy" Then
r.NumberFormat = "d/m/yyyy"
End If
Next
Next
End Sub

will loop over all your sheets and change cell formatted like:
12/28/2009
to:
28/12/2009

You will need to modify the code if the original format differs from the
above.

I suggest using a different approach and use something like:
28 December 2009

This is easily understood no matter which side of the Atlantic you are
standing on.
--
Gary''s Student - gsnu200909


"MAX" wrote:

Hello
I'm working on excel 2007 and I have a workbook with 15 sheets. The problem
is that the dates are all in English US and I want them in English UK. What
is the solution to change all the 15 sheets at once?

Thanks in advance.

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
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
How do I convert dd/mm/yy date format to yyddd Julian date format itzy bitzy[_2_] Excel Worksheet Functions 8 December 11th 09 03:20 AM
change date format dd/mm/yyyy to Julian date format? itzy bitzy Excel Worksheet Functions 1 December 8th 09 07:42 PM
Convert date + time text format to date format Paul Ho Excel Worksheet Functions 2 May 22nd 07 05:47 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM


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