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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
7,245
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Book3.xlsx
G
116:10
2Custom format
3h:mm
Sheet897
Cell Formulas
RangeFormula
G1G1=NOW()
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,286
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
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"
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,435
Office Version
  1. 365
Platform
  1. Windows
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")
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,613
Messages
5,838,378
Members
430,541
Latest member
Chopin1976

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
Top