Making now() to display only time

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,696
Office Version
  1. 365
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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
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
20,168
Office Version
  1. 2016
  2. 2013
  3. 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
48,548
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")
 

Watch MrExcel Video

Forum statistics

Threads
1,130,008
Messages
5,639,512
Members
417,092
Latest member
AppyTrailToMe

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