Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In the date formula below, in VBA, what does "()" mean"? The formula checker
says it is "volatile". I believe I may have mis-applied the formula, since it is not counting the number of days between dates correctly. Please advise. =IF(F11-TODAY()<365,"YES","NO") DOUG |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try reversing the symbols, though from the forumla, you may not even need them
-- Learning without thought is labor lost. Thought without learning is perilous. "DOUG" wrote: In the date formula below, in VBA, what does "()" mean"? The formula checker says it is "volatile". I believe I may have mis-applied the formula, since it is not counting the number of days between dates correctly. Please advise. =IF(F11-TODAY()<365,"YES","NO") DOUG |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Actually, yes, removing your parentheses should fix the problem
-- Learning without thought is labor lost. Thought without learning is perilous. "Benji" wrote: Try reversing the symbols, though from the forumla, you may not even need them -- Learning without thought is labor lost. Thought without learning is perilous. "DOUG" wrote: In the date formula below, in VBA, what does "()" mean"? The formula checker says it is "volatile". I believe I may have mis-applied the formula, since it is not counting the number of days between dates correctly. Please advise. =IF(F11-TODAY()<365,"YES","NO") DOUG |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Benji: Thank you. Actually, the formula I hit upon was as follows...
=IF(TODAY()-N2=365,"YES","NO") It did not work the other way, because it yielded a negative number. So, reversing the order was the correct solution. But, the first time I tried it, it did not work as my syntax was a little bit off. MS Excel lept in to help me in this case, and all is well with the world. Sincerely, DOUG "Benji" wrote: Actually, yes, removing your parentheses should fix the problem -- Learning without thought is labor lost. Thought without learning is perilous. "Benji" wrote: Try reversing the symbols, though from the forumla, you may not even need them -- Learning without thought is labor lost. Thought without learning is perilous. "DOUG" wrote: In the date formula below, in VBA, what does "()" mean"? The formula checker says it is "volatile". I believe I may have mis-applied the formula, since it is not counting the number of days between dates correctly. Please advise. =IF(F11-TODAY()<365,"YES","NO") DOUG |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Doug
There is nothing wrong with your formula, if it is in a cell in a worksheet. Today() is a volatile function, meaning that it has to recalculate whenever there is a change in the spreadsheet. =Today() will return an Excel date for today's value e.g. 21 Apr 2009, hence if you have a valid Excel date in cell F1, the formula will take one date from the other, and if the difference is less than 365 days it will return Yes, otherwise it will return No The formula could return what you might regard as a False "Yes", however, if the date in cell F11 is ahead of Today, as it will return a negative number - which of course is less than 365. If you wanted to be sure that the date was not ahead of Today's date, then you would need to include an AND statement. =IF(AND(Today()<=F11,F11-TODAY()<365),"Yes","No") You mentioned VBA in your Post, but I am assuming you meant a Worksheet formula. Within VBA, Today() is not recognised. You have to use Date. -- Regards Roger Govier "DOUG" wrote in message ... In the date formula below, in VBA, what does "()" mean"? The formula checker says it is "volatile". I believe I may have mis-applied the formula, since it is not counting the number of days between dates correctly. Please advise. =IF(F11-TODAY()<365,"YES","NO") DOUG |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
INDEX - volatile or not? | Excel Worksheet Functions | |||
is MATCH a volatile function? | Excel Discussion (Misc queries) | |||
formula result=Volatile | Excel Discussion (Misc queries) | |||
why is the INDIRECT function volatile? | Excel Worksheet Functions | |||
is there a NON-volatile version of INDIRECT ?? | Excel Discussion (Misc queries) |