Calculating with two condition

Closed
Sina - Oct 12, 2009 at 01:59 PM
sharpman Posts 1021 Registration date Saturday May 23, 2009 Status Contributor Last seen October 20, 2010 - Oct 18, 2009 at 03:58 PM
Hello,
I have the following problem.
I have a calculation that determines the number of days that have gone by from the date entered into the table.
EX. A1 = 12.10.2009("=today()" )
A2 = 01.10.09 (date of entry)
A3= 12 (result in no.)

Now I want to enter in A4 a date where a desicion of the issue is concluded (ex A4= 10.10.09)

I need a formula which recognised the date A4 when entered and disregards the previous one A1 .

Again A3 = A1-A2

and then when A4 is filled
A3 = A4-A2
I hope I expalined it enough
Thanks
Sina

2 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Oct 12, 2009 at 10:52 PM
not clear.
in A3the formula is
=a2-a1
in B4 type the formula(it does not matter whether A4 if filled or not)
=A4-A2

format A3 and B4 as number with no decimals

now whatever you enter in A4 automatically B4 will change.
if A4 is later than A2 then you get positive number otherwise negative number.

This solution appears trivial and that is why I doubt whether I have understood you.
0
Hi thank you for the answer .
I will try to explain it better
i am looking fo a formula which calculates
B1=Sum(A1+A2 , but if A3 has a value then it schould be used instead of A2 , B1=SUM(A1+A3) instead)

Right now I have two colums with 2 calculations and if one is true then I use conditional formatting to hide the other calculation which leaves me with a big black coloum on the sheet.
0
sharpman Posts 1021 Registration date Saturday May 23, 2009 Status Contributor Last seen October 20, 2010 183
Oct 18, 2009 at 03:58 PM
try this

=IF(A3 > 0,A1+A3,A1+A2)
0