ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Subtract 5 minutes from Now() (https://www.excelbanter.com/excel-programming/397710-subtract-5-minutes-now.html)

Chuck[_11_]

Subtract 5 minutes from Now()
 
If A1 = 5
How can I display a Date/Time [A1] minutes earlier than Now()

Chuck


Don Guillett

Subtract 5 minutes from Now()
 
=now()-(a1/60/24)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Chuck" wrote in message
...
If A1 = 5
How can I display a Date/Time [A1] minutes earlier than Now()

Chuck



Ron Coderre

Subtract 5 minutes from Now()
 
Try this:

=NOW()-5/(24*60)
Format the cell in an appropriate date/time format.

Just be aware that the cell won't keep incrementing at regular
intervals....Only when you recalculate.

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Chuck" wrote in message
...
If A1 = 5
How can I display a Date/Time [A1] minutes earlier than Now()

Chuck




Ron Coderre

Subtract 5 minutes from Now()
 
Actually, to match your request to use the value in Cell A1....

Try this:
=NOW()-A1/(24*60)

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Ron Coderre" wrote in message
...
Try this:

=NOW()-5/(24*60)
Format the cell in an appropriate date/time format.

Just be aware that the cell won't keep incrementing at regular
intervals....Only when you recalculate.

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Chuck" wrote in message
...
If A1 = 5
How can I display a Date/Time [A1] minutes earlier than Now()

Chuck






Michael Bowers[_2_]

Subtract 5 minutes from Now()
 
Since I always have a hard time remembering the "24*60" (not sure why), I
prefer to do this another way.

=NOW()-TIME(0,A1,0)

or you could try the following for a constant time period:

=NOW()-"00:05:00"

Thanks,
Mike


"Ron Coderre" wrote:

Actually, to match your request to use the value in Cell A1....

Try this:
=NOW()-A1/(24*60)

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Ron Coderre" wrote in message
...
Try this:

=NOW()-5/(24*60)
Format the cell in an appropriate date/time format.

Just be aware that the cell won't keep incrementing at regular
intervals....Only when you recalculate.

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Chuck" wrote in message
...
If A1 = 5
How can I display a Date/Time [A1] minutes earlier than Now()

Chuck







Chuck[_11_]

Subtract 5 minutes from Now()
 
On Tue, 18 Sep 2007 17:06:00 -0700, Michael Bowers <Michael
wrote:

Since I always have a hard time remembering the "24*60" (not sure why), I
prefer to do this another way.

=NOW()-TIME(0,A1,0)

or you could try the following for a constant time period:

=NOW()-"00:05:00"

Thanks,
Mike


"Ron Coderre" wrote:

Actually, to match your request to use the value in Cell A1....

Try this:
=NOW()-A1/(24*60)

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Ron Coderre" wrote in message
...
Try this:

=NOW()-5/(24*60)
Format the cell in an appropriate date/time format.

Just be aware that the cell won't keep incrementing at regular
intervals....Only when you recalculate.

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Chuck" wrote in message
...
If A1 = 5
How can I display a Date/Time [A1] minutes earlier than Now()

Chuck






Thanks guys.
I had tried: A1=5/24/60 then
now() - A1
It treated the value in A1 as a year so I tried (amoung many other things):
now() - [A1]minute
Macro wouldn't accept it.
So simple. Thanks again.

Chuck


Chuck[_11_]

Subtract 5 minutes from Now()
 
On Tue, 18 Sep 2007 17:06:00 -0700, Michael Bowers <Michael
wrote:

Since I always have a hard time remembering the "24*60" (not sure why), I
prefer to do this another way.

=NOW()-TIME(0,A1,0)

or you could try the following for a constant time period:

=NOW()-"00:05:00"

Thanks,
Mike


"Ron Coderre" wrote:

Actually, to match your request to use the value in Cell A1....

Try this:
=NOW()-A1/(24*60)

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Ron Coderre" wrote in message
...
Try this:

=NOW()-5/(24*60)
Format the cell in an appropriate date/time format.

Just be aware that the cell won't keep incrementing at regular
intervals....Only when you recalculate.

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Chuck" wrote in message
...
If A1 = 5
How can I display a Date/Time [A1] minutes earlier than Now()

Chuck






Correction: Now() - [A1]/24/60
square brackets around A1

Thanks guys.
I had tried: A1=5/24/60 then
now() - A1
It treated the value in A1 as an DAY so I tried (amoung many other things):
now() - [A1]minute
Macro wouldn't accept it.
So simple. Thanks again.

Chuck



All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com