ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Hot key for time? (https://www.excelbanter.com/new-users-excel/79455-hot-key-time.html)

Dave in Des Moines

Hot key for time?
 
I have an employee who needs to complete a time ananlysis where he records
how much time he spends on various tasks each day. I thought the simplest way
to do it would be to create "hot key" in Excel, so he could point to a cell,
hit a key (say, F8, or shift-F8) to put the current time in the cell.

Let's say the worksheet has three columns: Start time, End time, and Task.
When he gets to work, he manually enters the start time in the top cell of
the Start Time column, then relocates the focus to the adjacent End Time
cell. When he changes tasks, he hits the hot key, and it records the current
time in both that cell and the next row's Start Time cell. Then he enters the
task in the third column.

Then, I can create a simple formula to calculate the length of each task.

Any idea how I could do this?

Thanks!

dc

CLR

Hot key for time?
 
Hi dc...........
Here's a macro that will date/time stamp the current cell selected.....note
the date will be necessary to be able to calculate expanses of time across
midnight, so might as well use it all the time. The macro can of course be
modified to switch the activecell as you require.

Sub TimeStamp()
' Select a cell and run the macro to insert
' the current date and time
ActiveCell.FormulaR1C1 = Date & " " & Time
End Sub

hth
Vaya con Dios,
Chuck, CABGx3


"Dave in Des Moines" wrote:

I have an employee who needs to complete a time ananlysis where he records
how much time he spends on various tasks each day. I thought the simplest way
to do it would be to create "hot key" in Excel, so he could point to a cell,
hit a key (say, F8, or shift-F8) to put the current time in the cell.

Let's say the worksheet has three columns: Start time, End time, and Task.
When he gets to work, he manually enters the start time in the top cell of
the Start Time column, then relocates the focus to the adjacent End Time
cell. When he changes tasks, he hits the hot key, and it records the current
time in both that cell and the next row's Start Time cell. Then he enters the
task in the third column.

Then, I can create a simple formula to calculate the length of each task.

Any idea how I could do this?

Thanks!

dc


Kevin B

Hot key for time?
 
Ctrl + Shift + : is the Excel hot key for inserting the current time in the
current cell.

Ctrl + ; is the Excel hot key for putting the current date in the current
cell.

You can acutally put both entries in a cell using the hot keys, just insert
the date with the above hot keys, press the space bar and then insert the
time with the above hot keys and press enter.

Much easier than writing a macro
--
Kevin Backmann


"Dave in Des Moines" wrote:

I have an employee who needs to complete a time ananlysis where he records
how much time he spends on various tasks each day. I thought the simplest way
to do it would be to create "hot key" in Excel, so he could point to a cell,
hit a key (say, F8, or shift-F8) to put the current time in the cell.

Let's say the worksheet has three columns: Start time, End time, and Task.
When he gets to work, he manually enters the start time in the top cell of
the Start Time column, then relocates the focus to the adjacent End Time
cell. When he changes tasks, he hits the hot key, and it records the current
time in both that cell and the next row's Start Time cell. Then he enters the
task in the third column.

Then, I can create a simple formula to calculate the length of each task.

Any idea how I could do this?

Thanks!

dc



All times are GMT +1. The time now is 07:08 AM.

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