Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!

Subscribe for Free Excel tips & more!

Free Excel Forum

Macro For Current Time

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

View Answers     

Similar Excel Tutorials

Run a Macro from Another Macro in Excel
I will show you how to run a macro from another macro in Excel.  This means that you can run any macro when you ne ...
NOW() - Display The Current Time in Excel
This Excel tip will show you how to display the current time within any Excel spreadsheet. This is a useful functio ...
Install a Macro into an Excel Spreadsheet
This tip will show you how to copy an Excel Macro into your workbook or spreadsheet. You will learn the different l ...
Run a Macro When you Click a Button in Excel
Make a macro run when you click a button in the worksheet in Excel. This allows you to create a button and put it a ...

Helpful Excel Macros

Save the Current Worksheet as a New File in the Current Folder
- This Excel Macro saves the currently visible worksheet into the SAME folder as the current file. It is different from
Automatically Run a Macro at a Certain Time - i.e. Run a Macro at 4:30PM every day
- Automatically run an Excel macro at a certain time. This allows you to not have to worry about running a macro every da
Format Cells as Time in Excel
- This free Excel macro formats a selection of cells in the Time format in Excel. This Time number format means that inst
Create a 12 Month Calendar With The Current Day Highlighted in Excel
- Create a 12 month formatted calendar on a new tab in Excel with the current day highlighted. This macro creates a nicel
Print The Current Worksheet in Excel
- This free Excel macro will print the current active worksheet in Excel. This means that whatever sheet you are currentl

Similar Topics

Hi everyone.

I have query on applying current time. when I use NOW() it gives me current time as well as current date. I just want the current time which I can get by using CTRL+SHIFT+;. But I would like to know the name of function which gives just current time as i need to build macro to insert only current time(not with current date). Or pleae let me know the macro code by which i can get only current time.

Ok I know how to get the current time with NOW(). The thing is once that is entered I dont want it to change.
current format of worksheet as follows

Enter race number in column A as racer goes past - Column B is time stamped with current time. The problem being time keeps updating to current time whenever another entry is made.

I am currently using excel to display some information. I was hoping someone can help me out with a Macro script. I am trying to create a macro that will check the current time. If the current time is greater than a time in a cell, then it should delete the row.
Thanks for the help in advance

i am trying to carry out a project for a customer payment system for an Internet Cafe. i have command buttons for time in and time out with macro's assigned to each. when i click on the time in button i want it to automatically enter in the current time. then when i click on the time out button i want it to automatically enter in the current time it is then. my current problem is that it changes both time in and time out values instead of just the time in or the time out. this is the part of the code:Sub TimeIn()
' TimeIn Macro
' Macro recorded 07/03/2003 by 10021878

ActiveCell.FormulaR1C1 = "=NOW()"

End Sub
Sub Timeout()
' Timeout Macro
' Macro recorded 07/03/2003 by 10021878

ActiveCell.FormulaR1C1 = "=NOW()"

End Sub

i would be very grateful if you could help me

I have a macro that inputs the current time with the workbook opens and closes so the user doesn't reverse the computer clock. How can I display the current time with my macro below? I would like message to include "The current time: HH:MM"

If Sheets("sheet1").Range("A24").Value < Sheets("sheet1").Range("B24").Value Then
MsgBox "System Clock Reverse-Adjustment Has Been Detected." & vbLf & _
" Adjust Your System Clock To The Correct Time.", vbExclamation, "System Clock"


I am trying to create a macro that will first enter the current time (once I click any key combination, say CTRL+Q) and then lock that particular cell.

Now, this is what I really want to do...

In Cell A1, there will be Out Time for the break, In Cell B1, it will be In Time, Cell C1 should calculate the difference between the Out Time and In Time. Note, some breaks may be spread over two calendar days.



I'm not much of an Excel user except for just the basics. For example, and I should be embarrassed here, I often use Excel in place of the MS Calculator.

Having gotten THAT off my chest, here's what I want to do and I'm hoping you'll accept my shortcomings and offer some advice:

I want to create a time sheet that will log DATE, START TIME, STOP TIME, and TOTAL TIME on a row by row basis and by just hitting two different buttons.

The sheet would be set up with Column A for "Date", Column B for "Description of Work Performed," Column C for "Start Time," Column D for "Stop Time," and Column E for "Total Time." Here's how I'd like it to work:

I would go to Cell B2, hit the START button, and the macro would place the date in A2 and the current time in C2. In B2, I'd type in what I was working on and when I hit the STOP button, that macro would place the current time in D2 and the total time spent in E2.

Then I'd go to the next row and do the same thing. In B3, I'd hit the START button and the macro would place the date in A3 and the current time in C3. In B3, I'd type in what I was working on and when I hit the STOP button, that macro would place the current time in D3 and the total time spent in E3. In other words, the macro would work row by row.

In searching the forum here, I've learned how to program a module in Visual Basic as follows:

Sub test()

[a1] = Format(Now, "hh:mm")

End Sub

However, since that only puts the time stamp in A1, I'm lost.

Is it possible to have a cell return the current time only from the NOW() function instead of both the current date and time?

i want to make a list of employee check-in times and i'll use a macro to refresh the NOW time to compare against when they are supposed to check-in, how close they currently are to their check-in times, etc. but i can't figure out how to get just the current time, not the date.

if not, is there a way to finnagle around it? like return only certain characters then convert that to a time or something?

thank you in advance for your help!!!

I'm new to this Forum.
I have programmed in VB, MSAccess, C++, PowerBuilder & ASP.Net & other older languages but never in Excel.
I searched for Timestamp & the one post I found didn't answer my question.

My users have a spreadsheet to which they have added a column with the header 'Time'.
They want the current time automatically inserted into the Time field for the current row every time a new record is put in & the Enter Key is hit.
When I tried using the Now() function in a macro - all it does is always give the current time in all the Time cells - even for records entered 5 minutes ago - or two days ago.
I need whatever time is first inserted into the Time cell for a row - to persist and not change.

I'd appreciate any help you can give me.

Hi all

I am fairly new to Excel so if this is easy please excuse me.

How can you get excel to move to the next row. I will explain more.
in a2 b2 and c2 I have to copy the current date, time and my name.

I have entered the following into cells a1 b1 & c1

a1 current date =today() b1 my no. (1235) c1 current time =now()

I have a macro which will copy the info above into a2 b2 & c2.

I then have to manuallly enter more data into cells d2 to g2 and there could be a gap of a few sceonds before I have to enter more data.

I then move to the next row and have to enter current time date and no. again. If i use the macro it complets the row above. So how do I get it to drop one row and then copy a1:c1 to a3:c3. and not a2:c2 again.

Hope this is clear
Thank Bill

I would like to create a macro that will give me a static date and time. If I use the NOW function in my macro, it updates the date and time. I want it so that when I run the macro it gives me the current date and time, and that current date and time will never change. Is this possible? Any help would be appreciated.

Here's my problem... We have a sheet we use for shipments and we basically want to say if the date is less then current date say late, and if date is later than current date say on time, and, if date is equal to current date and current time is less than 12:00pm say on time otherwise if current time is past 12:00pm say late. I have a formula working for the first 2 arguments but the time portion is puzzling. If i use ctl+shift+enter as my "current time" in a cell and reference that in my formula it works. But if i use now or a now converted to text string formula it will not process it accurately. I've attached a sheet with an example. Any help would be appreciated. Thanks in advance.

Hi I want a FORMULA or MACRO, to update the current time in a cell PER SECOND.

I realise the following, but the formula needs to press F9 and the macro only calculates per minute, I have tried to edit but it didn't work:

=NOW() then pressing F9 to update


Sub UpdateTime()
Application.OnTime Now + TimeValue("00:01:00"), "TimeUp" 'i min intervals
' Application.OnTime Now + TimeValue("00:05:00"), "TimeUp" '5 min intervals

End Sub
Sub TimeUp()
[a1] = Time
End Sub

I'd appreciate a current time that is updated PER SECOND in a cell, preferaby a formula, or a macro please.


Stephan Rands


Hi everyone, sorry I don't know alot about macros so I'm not sure how hard this would be (or if possible).....

I'm looking for a macro, that when active will, check my worksheet every 5mins. It then compares the time in the range of I4:I350 (if no time ignores the line) with the current time. If the current time has passed the range time and cell offset by the range of 1 has anything in it, it will highlight offset 1 with the color red.

If the offset of 1, has something input into that cell it would then clear its coloring.
Thanks for your ideas/input.

Thank you!

For my snowplowing business, I am required to turn in a log of the location(s) I have visited and the corresponding date and time(s) that I started and finished the job.

I would like to take my laptop with me in the truck so that I can easily record the start and end times of work performed at each site.

I have created a macro (programed with a shortcut ctrl+a) that uses the now() function to time stamp.

The issue is that whenever I run the macro, it updates the times in all non-active cells to reflect the current date and time.

Is there a way to avoid updating all non-active cells (with prior data) so that only the most recent entry reflects the most current date and time? If so, please help me revise my macro code. Thanks in advance!

Sub Macro1()
' Macro1 Macro
' Macro recorded 1/13/2011 by BMC
ActiveCell.FormulaR1C1 = "=NOW()"

End Sub


I want users to put the current time in the excel sheet. However, is there anyway, we can allow users to put the time not less than current time.

Say, if the current time is 10:05 am as per system, user will not be allowed to put 10:04 am in the cell.

Kindly assist.


Hi all.

Is it possible to make a button for cell A2. When my mouse clicks on A2 the current time in military time(24hr:mm format) is automaticaly inputed in B5 if it is 5am-5:59am or if the time is 6am-6:59am when I click A2 the current time will be inputed in B6 etc.

Sorry for my bad english and I appreciate any help. Thank you.

I use a excel file through the course of the day and need to insert the current date in one column and the current time in the next column. I want to be able to just highlight the selected range of cells I need to insert into and hit a macro button and have the date and time inserted into just the cells I have highlighted. I'm not sure how to make this work with just the cells I've highlighted. Any help any one can give me would be greatly appreciated. Thanks!


I have a need to record information at certain time intervals.

I want to have an excel workbook open on my desk top which the macro will reside in and keep the recorded data.

How can I tell a macro to automatically run when the current system time is at 10:00 and again at 10:15 in the morning?


How do I create a macro and command button for an Access Form.
User should click command button and have current time enter into Start Time field.



Is there a way to have a current date and time box somewhere on a sheet? I
know the =now() function does it in a cell, but it only refreshes on macro
runs etc. I'm looking for something real time in the sheet.

Any ideas?


--Randy Starkey


I am creating a macro that will insert the current date on a spreadsheet. I used this code:

Please Login or Register  to view this content.

The problem is that I only want the date ... not the time showing at all. This is important because the spreadsheet is going to be saved as a CSV and imported into another program. Importing the time would be a problem.

Can you help?

Thank you so much!


I am working on a spreadsheet where I need to create a macro. The spreadsheet (SS) is a run book and based on timing. This SS have activities in column A and 5 groups in Row A1. I need to have 5 buttons for each group.
There will be a cell showing current time and each activity will start at a fixed time. As soon as I press a button for specific group, I want to send an email out using a macro which read the activity as per the following:

For example, the following SS shows exactly what I am working on.

1. When I press button for group 1 where the macro first read the current time from cell A2
2. If the time is equal or more than the current time then do steps 3 to 7 else go to 8
3. check the empty cells in Column F (Group 1)
4. Once reached to the empty cell then read the value of Activity cell in that row (empty cell is F4 then it should read the value of cell A4 which is "Activity 1")
5. Then it populate the current time in cell F4
6. And send out one email (pre-drafted) to an email address assigned to Group 1 with subject telling the cell value of A4
7. Change the colour of cell F4
8. error message saying "its not your time yet"

Current Time 09:00:00 Groups -> Group 1 Group 2 Group 3 Group 4 Group 5 Start Finish Actual Finish Button 1 Button 2 Button 3 Button 4 Button 5 Activities Activity 1 09:15:00 09:35:00 Activity 2 09:16:00 09:40:00 Activity 3 09:20:00 09:35:00 Activity 4 09:30:00 09:55:00 Activity 5 09:45:00 10:15:00

I have a macro to send email out but this SS needs conditional macro where I need your help. Could someone help me to create this macro please?

Many Thanks in advance....


I need a macro that sets the current date in a specific cell.

In cell A1, for example, I need to put the current date. Whenever you use =today() it only inserts the date it was entered, e.g. it doesn't update every time you open the document.

I tried creating a macro that enters =today() into the cell A1, but the problem I have is that it would enter the date, but it would put it in whatever cell was selected. This isn't good enough, as it has to be put into a specific cell, for this example A1.

I need a macro that when it runs (and it ill be be ran everyday) the contents of cell A1 will become the current date.

I may need to edit this in the future so that I can change the updating cell easily from A1 to a different cell.

Ok, so I have to do this for school and I am totally lost in this class. I have no clue what I am supposed to do for this assignment and the teacher wont help me even though i told him i have no clue what i am doing. Here are the instructions that I was given.

"Write a macro to put the current data and time in cell A1 on the summary sheet. It should display the current date and time -correct to the second. Create a hotspot to run the macro."

I have no clue what that means. What am I supposed to do? Anybody know any step-by-step directions.....Please help!!!