PDA

View Full Version : Finding the difference of two dates based on criterion.



aligahk06
04-27-2010, 12:05 AM
Dear All,

Greetings of the day!!!!!!!!

I have two column say ColD and ColF.If ColD date is greater than & equla to 01/03/2010 and less than equal to 31/03/2010 ( First March 2010 and 31st march 2010)
and Col V contains the text "DISMANTLE" then subtract (ColF-ColD) (i.e difference of two date-19) and
If ColV contains the text other than "DISMANTLE" i.e ( Not Dismatle ) then difference of two dates i.e (ColF-01/03/2010).

Any help.

Rgds,

Aligahk06

Bob Phillips
04-27-2010, 12:26 AM
Try

=IF(AND(D2>=--"2010-03-01",D2<"2010-004-01"),IF(V2="DISMANTLE",F2-D2,F2-"2003-03-01"),"")