ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Time and Date Entry Shortcuts? (https://www.excelbanter.com/excel-worksheet-functions/171538-time-date-entry-shortcuts.html)

Tammy

Time and Date Entry Shortcuts?
 
Anyone know of a way to enter times and dates without hyphens or colons?
Would like to 10-key a six-digit date and 10-key a four-digit time without
keying in the hyphens, dashes, or colons? Please advise when you can.
Thanks so much!


ShaneDevenshire

Time and Date Entry Shortcuts?
 
Hi Tammy,

You might be able to do this with VBA if you always enter the dates and
times in a given location in the spreadsheet.

Of course if the date is the current date you can press Ctrl+; (control
semicolon)
And if the time is now you can press Ctrl+: (control colon -- control shift
semicolon)

Here is the code:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Set isect = Application.Intersect(Range("DateTime"), Target)
If Not isect Is Nothing Then
If Len(Target) = 6 Then
Target = Left(Target, 2) & "/" & Mid(Target, 3, 2) & "/" &
Right(Target, 2)
ElseIf Len(Target) = 5 Then
Target = Left(Target, 1) & "/" & Mid(Target, 2, 2) & "/" &
Right(Target, 2)
ElseIf Len(Target) = 4 Then
Target = Left(Target, 2) & ":" & Right(Target, 2)
Else
Target = Left(Target, 1) & ":" & Right(Target, 2)
End If
End If
Application.EnableEvents = True
End Sub

--
cheers,
Shane Devenshire


"Tammy" wrote:

Anyone know of a way to enter times and dates without hyphens or colons?
Would like to 10-key a six-digit date and 10-key a four-digit time without
keying in the hyphens, dashes, or colons? Please advise when you can.
Thanks so much!


CLR

Time and Date Entry Shortcuts?
 
I used to enter datecodes as
200801021423 (formatted as text)
This broke out to
Year= 2008
Month=01
Day = 02
Time=1423 (Military time for 2:23pm)

Vaya con Dios,
Chuck, CABGx3


"Tammy" wrote:

Anyone know of a way to enter times and dates without hyphens or colons?
Would like to 10-key a six-digit date and 10-key a four-digit time without
keying in the hyphens, dashes, or colons? Please advise when you can.
Thanks so much!


T. Valko

Time and Date Entry Shortcuts?
 
See this:

http://www.cpearson.com/Excel/DateTimeEntry.htm

--
Biff
Microsoft Excel MVP


"Tammy" wrote in message
...
Anyone know of a way to enter times and dates without hyphens or colons?
Would like to 10-key a six-digit date and 10-key a four-digit time without
keying in the hyphens, dashes, or colons? Please advise when you can.
Thanks so much!




Rachel[_3_]

Time and Date Entry Shortcuts?
 
How do I add multple events in one Worksheet. ie..I want the date in column
A, time change in column B and H.

Thanks,


"T. Valko" wrote:

See this:

http://www.cpearson.com/Excel/DateTimeEntry.htm

--
Biff
Microsoft Excel MVP


"Tammy" wrote in message
...
Anyone know of a way to enter times and dates without hyphens or colons?
Would like to 10-key a six-digit date and 10-key a four-digit time without
keying in the hyphens, dashes, or colons? Please advise when you can.
Thanks so much!





T. Valko

Time and Date Entry Shortcuts?
 
You'd have to combine both procedures into one. That's beyond my ability!

--
Biff
Microsoft Excel MVP


"Rachel" <Rachel @discussions.microsoft.com wrote in message
...
How do I add multple events in one Worksheet. ie..I want the date in
column
A, time change in column B and H.

Thanks,


"T. Valko" wrote:

See this:

http://www.cpearson.com/Excel/DateTimeEntry.htm

--
Biff
Microsoft Excel MVP


"Tammy" wrote in message
...
Anyone know of a way to enter times and dates without hyphens or
colons?
Would like to 10-key a six-digit date and 10-key a four-digit time
without
keying in the hyphens, dashes, or colons? Please advise when you can.
Thanks so much!








All times are GMT +1. The time now is 01:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com