Originally Posted by
blastranger
It works perfectly.
via Tools -> Options -> Calculation tab enable Iteration and set Max Iteration to 1 -> click OK.
Will that change for permanent? why need to change that? if change permanent would it be affected to another excel file?
Also explain about =IF(A2,A2,NOW()*(B2<>""))
why B2<>""
The Iteration setting is an Application level setting and will be saved with the workbook.
In regard to how Excel will enforce calculation settings see: http://www.decisionmodels.com/calcsecretse.htm
Originally Posted by
blastranger
why need to change that?
The formula used is circular by nature - that is to say A2 is a precedent of itself - enabling Iteration permits self referencing formulae.
Originally Posted by
blastranger
Also explain about =IF(A2,A2,NOW()*(B2<>""))
why B2<>""
Break the formula out into parts.
DateTime values in Excel are numbers - Time being decimal - ie 24 hours = 1.
For ex. 7th Sep 10:00 AM equates to 40428.4166666667 on a 1900 date system.
It follows that NOW() is returning a Numeric value.
will return a Boolean of TRUE or FALSE which when coerced (by means of a suitable arithmetic operation) equate to 1/0 respectively, eg:
10* FALSE -> 10 * 0 -> 0
10 * TRUE -> 10 * 1 - > 10
It follows then that only if B2 is non-blank/non-null will our calculation generate anything other than 0.
With that in mind we can look at the formula as a whole:
We know that A2 will contain a numeric value - either 0 or a datetime value.
We've seen already how Booleans can be coerced to Integer.
When working in reverse (ie from Number to Boolean) it is important to note that only the value 0 equates to FALSE, eg:
=IF(0.01,TRUE,FALSE) -> TRUE
=IF(0,TRUE,FALSE) -> FALSE
Given this fact it follows that where viable we can use a number to generate a TRUE/FALSE test - in our case we use the value in A2.
So in essence what our formula says :
=IF(A2 not 0, A2 , current date time if B2 is not empty else 0)
So once A2 is populated with the a date time value (ie when content is first added to B2) the value in A2 will never change given the IF test will always return TRUE and thus the cell will refer to itself forever more.
Bookmarks