Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Can I use the NOW() function in a formula?

I have a cell B1 that has NOW() time and another cell B2 that has NOW() date.
I am trying to have data from another cell F1 brought in to the destination
cell B3,
when a given date and time occur.
=(IF(AND(B1="23:00:00",B2="12/03/2009"),F1," ")
This formulas does not work.
The Clock is continuously active / always changing.
Any suggestions would be appreciated. Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Can I use the NOW() function in a formula?

The NOW() function returns both a date and a time. Even if you format the
cell to display only date/time, all the data is still retained. NOte that if
you did want just the date, you could use the TODAY() function. Your formula
literally corrected would be:


=IF(NOW()=TIMEVALUE("23:00:00")+DATEVALUE("12/03/2009"),F1," ")

The problem is, this criteria would only be met for a few nanoseconds!
Keeping in mind that time is stored as a decimal portion of a number, perhaps
what you really want is:
=IF(AND(TODAY()=DATEVALUE("12/03/2009"),MOD(NOW(),1)TIMEVALUE("23:00:00")),F1," ")

Note that if you change the date and time checks to cell references, it
would make this formula slightly shorter.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Smith512" wrote:

I have a cell B1 that has NOW() time and another cell B2 that has NOW() date.
I am trying to have data from another cell F1 brought in to the destination
cell B3,
when a given date and time occur.
=(IF(AND(B1="23:00:00",B2="12/03/2009"),F1," ")
This formulas does not work.
The Clock is continuously active / always changing.
Any suggestions would be appreciated. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Can I use the NOW() function in a formula?

At 3:33 PM today I entered this into a cell
=IF(TIME(HOUR(NOW()),MINUTE(NOW()),0)=TIME(15,37, 0),"X","not yet")
It displayed NOT YET
I pressed F9 every 10 seconds to recalculate the worksheet
When the time on taskbar showed 3:37 PM the cell displayed X

For the Date I would use DATE(2009,12,13) rather than DATEVALUE to be
date-format independent

=IF(AND(TODAY()=DATE(2009,12,13),TIME(HOUR(NOW()), MINUTE(NOW()),0)=TIME(15,37,0),F1,"
")

best wishes
--
Bernard Liengme
http://people.stfx.ca/bliengme
Microsoft Excel MVP

"Smith512" wrote in message
...
I have a cell B1 that has NOW() time and another cell B2 that has NOW()
date.
I am trying to have data from another cell F1 brought in to the
destination
cell B3,
when a given date and time occur.
=(IF(AND(B1="23:00:00",B2="12/03/2009"),F1," ")
This formulas does not work.
The Clock is continuously active / always changing.
Any suggestions would be appreciated. Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with OR function in IF function formula veggies27 Excel Worksheet Functions 3 March 18th 08 10:04 PM
formula using IF function bronxbabe Excel Worksheet Functions 3 February 13th 08 04:15 PM
IF Function and a formula Fred Atkinson Excel Worksheet Functions 7 December 4th 06 07:42 AM
formula or function? grok Excel Discussion (Misc queries) 1 November 2nd 06 08:14 PM
A formula/function to return a formula/function sith janitor Excel Worksheet Functions 4 September 22nd 06 05:01 PM


All times are GMT +1. The time now is 01:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"