Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Entering 24 Hour Clock without entering :

I am trying to figure out how to enter military time into a spreadsheet and
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007

EX enter 1330
it appears in cell as 13:30

In a previous post I saw a response that said to do the following:

"Preformat the column as time and try this.
Right click sheet tabview codeinsert this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"

I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!

Jennifer


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Entering 24 Hour Clock without entering :

Check out this link...

http://www.cpearson.com/excel/DateTimeEntry.htm
--
HTH...

Jim Thomlinson


"JB Bates" wrote:

I am trying to figure out how to enter military time into a spreadsheet and
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007

EX enter 1330
it appears in cell as 13:30

In a previous post I saw a response that said to do the following:

"Preformat the column as time and try this.
Right click sheet tabview codeinsert this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"

I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!

Jennifer


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Entering 24 Hour Clock without entering :

AWASOME!!!! This worked!! thank you for directing me to that article. I
also changed my date fields to be entered without "/"

You have totally made my week!! thanks!

"Jim Thomlinson" wrote:

Check out this link...

http://www.cpearson.com/excel/DateTimeEntry.htm
--
HTH...

Jim Thomlinson


"JB Bates" wrote:

I am trying to figure out how to enter military time into a spreadsheet and
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007

EX enter 1330
it appears in cell as 13:30

In a previous post I saw a response that said to do the following:

"Preformat the column as time and try this.
Right click sheet tabview codeinsert this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"

I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!

Jennifer


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Entering 24 Hour Clock without entering :

Is it possible to have this apply to more than one range in a spreadsheet?

I substituted x5:ac7 instead of the a1:a10 range

now i want to apply this ALSO to ranges I11:L20 AND O11:R20

THANKS

"Jim Thomlinson" wrote:

Check out this link...

http://www.cpearson.com/excel/DateTimeEntry.htm
--
HTH...

Jim Thomlinson


"JB Bates" wrote:

I am trying to figure out how to enter military time into a spreadsheet and
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007

EX enter 1330
it appears in cell as 13:30

In a previous post I saw a response that said to do the following:

"Preformat the column as time and try this.
Right click sheet tabview codeinsert this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"

I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!

Jennifer


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Entering 24 Hour Clock without entering :

change your range to...

If Application.Intersect(Target, Range("x5:ac7, I11:L20, O11:R20")) Is
Nothing
--
HTH...

Jim Thomlinson


"JB Bates" wrote:

Is it possible to have this apply to more than one range in a spreadsheet?

I substituted x5:ac7 instead of the a1:a10 range

now i want to apply this ALSO to ranges I11:L20 AND O11:R20

THANKS

"Jim Thomlinson" wrote:

Check out this link...

http://www.cpearson.com/excel/DateTimeEntry.htm
--
HTH...

Jim Thomlinson


"JB Bates" wrote:

I am trying to figure out how to enter military time into a spreadsheet and
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007

EX enter 1330
it appears in cell as 13:30

In a previous post I saw a response that said to do the following:

"Preformat the column as time and try this.
Right click sheet tabview codeinsert this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"

I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!

Jennifer




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Entering 24 Hour Clock without entering :

Range("X5:AC7, I11:L20, O11:R20")


Gord Dibben MS Excel MVP

On Mon, 5 Oct 2009 12:47:01 -0700, JB Bates
wrote:

Is it possible to have this apply to more than one range in a spreadsheet?

I substituted x5:ac7 instead of the a1:a10 range

now i want to apply this ALSO to ranges I11:L20 AND O11:R20

THANKS

"Jim Thomlinson" wrote:

Check out this link...

http://www.cpearson.com/excel/DateTimeEntry.htm
--
HTH...

Jim Thomlinson


"JB Bates" wrote:

I am trying to figure out how to enter military time into a spreadsheet and
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007

EX enter 1330
it appears in cell as 13:30

In a previous post I saw a response that said to do the following:

"Preformat the column as time and try this.
Right click sheet tabview codeinsert this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"

I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!

Jennifer



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
Entering times in 24 hour format Nevets Excel Discussion (Misc queries) 12 October 17th 07 12:23 AM
entering date/time in 1/4 or 1/2 hour increments? David Excel Discussion (Misc queries) 5 August 28th 07 10:31 AM
Decimal to 24 hour clock please. Steved Excel Worksheet Functions 21 June 9th 05 07:16 AM
Entering hour minute only 'now' in Excel (without day/date) Ian Excel Discussion (Misc queries) 1 December 15th 04 09:58 PM
subtracting times using 24 hour clock andrew pronto Excel Worksheet Functions 6 November 28th 04 02:26 AM


All times are GMT +1. The time now is 12:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"