Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello-
I am trying to get the current time less ten minutes to calculate in a cell. I need the time only, no date so I was told to use the MOD portion in the formula below. ActiveCell.FormulaR1C1 = "=MOD(NOW()- Timeserial(0,10,0)" If it is 5:37 AM, I want 5:27 AM reported with now date in the field. Thanks Scott |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Scott,
Am Mon, 14 Jan 2013 06:00:11 -0800 (PST) schrieb Sabosis: I am trying to get the current time less ten minutes to calculate in a cell. I need the time only, no date so I was told to use the MOD portion in the formula below. ActiveCell.FormulaR1C1 = "=MOD(NOW()- Timeserial(0,10,0)" If it is 5:37 AM, I want 5:27 AM reported with now date in the field. format the cell "h:mm AM/PM" or do it in VBA: With ActiveCell .Formula = "=NOW()-TIME(0,10,0)" .NumberFormat = "h:mm AM/PM" End With Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to: date field minus minutes equals new date | Excel Worksheet Functions | |||
Minus time | Excel Discussion (Misc queries) | |||
Minus time | Excel Discussion (Misc queries) | |||
Using military time but with 100 minutes not 60 minutes | Excel Discussion (Misc queries) | |||
How do you subtract time? (ie 03:15 am minus 5 minutes) | Excel Discussion (Misc queries) |