Hi,
What is the purpose of IF for this formula
=IF(ABS((AL$5-$Q7)*$AG7)>ABS(AJ7),0,(AJ7-((AL$5-$Q7)*$AG7)))
What is the formula doing?
Thanks.
Hi,
What is the purpose of IF for this formula
=IF(ABS((AL$5-$Q7)*$AG7)>ABS(AJ7),0,(AJ7-((AL$5-$Q7)*$AG7)))
What is the formula doing?
Thanks.
The basics of the IF formula are
IF A THEN B ELSE C
In excel it looks like =IF(A,B,C)
In the case of your formula the A is
ABS((AL$5-$Q7)*$AG7)>ABS(AJ7)
Which is comparing the absolute value (ABS) of result the number in cell AL5 minus the number in cell Q7 that result multiplied by the number in cell AG7 and the number in AJ7. IF the value of the first portion [ABS((AL$5-$Q7)*AG7)] is Greater Than (>) the value of the second portion [ABS(AJ)] then it will return TRUE for A and move to B, if it is not Greater than, then it Returns FALSE and return to C.
The B in this formula is a static 0
The C in this formula is (AJ7-((AL$5-$Q7)*$AG7))
Hi
How about this one
=IF(OR(W41="ABS",W41="MBS",W41="CMO",X41="Lotteries"), 1,0)
Thanks
The OR function adds a slightly new dimension into it
Rather than IF A THEN B ELSE C
It becomes IF A OR D THEN B ELSE C
The OR function can hold mulitple conditions that it could be, in your case it seems that if the value in cell W41 is "ABS", "MBS", or "CMO" or if Cell X41 = "Lotteries" then it will pass the TRUE statement and return B (1), and if none of the statments are correct than it will return C (0).
Hope this is helping.
John
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks