Making now() to display only time

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I want to enter a time in a cell but if I open the file any other time, I want the cell show the current time. Very similar to today() when I open it the file it will show the current date.
ctrl+shift+: display the current time but it wont change after. I am thinking of Now() function, but how can I force now() to display the time only not the date. Or do you have any other suggestion. Thank you very much.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi,

Book3.xlsx
G
116:10
2Custom format
3h:mm
Sheet897
Cell Formulas
RangeFormula
G1G1=NOW()
 
Upvote 0
Either use
VBA Code:
Sub MM1()
With [A1]
    .Value = Now
    .NumberFormat = "h:mm:ss AM/PM"
End With
End Sub
OR
Use the Now() function with the cell custom formatted to "h:mm:ss AM/PM"
 
Upvote 0
Depending on what you are going to do with the time, perhaps you could use this which doesn't require you to format the cell specifically.

21 04 06.xlsm
A
111:08 PM
Time
Cell Formulas
RangeFormula
A1A1=TEXT(NOW(),"h:mm AM/PM")
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top