Multiple IF functions with dates

Closed
CJ - Jan 15, 2015 at 12:14 PM
ArashMan
Posts
41
Registration date
Monday December 15, 2014
Status
Member
Last seen
February 18, 2015
- Jan 20, 2015 at 11:29 PM
Hello,

I am rather new to creating Excel formula

I want to create the following rule working with dates:

IF date in A1<date in A2, then date in A3 - date in A2 to produce number of days difference
BUT IF date in A1>date in A2, then date in A3 - date in A1 to produce number of days difference

Is this possible?

Many thanks
C


1 reply

ArashMan
Posts
41
Registration date
Monday December 15, 2014
Status
Member
Last seen
February 18, 2015
1
Jan 20, 2015 at 11:29 PM
Dear CJ
i dont understand what you mean by bellow parts
date in A2 to produce number of days difference
date in A1 to produce number of days difference
do your mean the difference of larger date minus the other?
if it is you can use something like this in A3 cell
=if(A1<A2,A2-A1,if(A1>A2,A1-A2))
i hope its what are you looking for
0