View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Multiple logical formula

=IF(C1A1,IF(C1B1,0,C1-B1),IF(C1<B1,A1-B1,A1-C1))
or =IF(C1A1,MIN(C1-B1,0),A1-MAX(B1,C1))

Note that you didn't specify what happens if C1=A1, or if C1=B1.
--
David Biddulph

"spaceage" wrote in message
...
i wud like to put this formula in excel,if someone can please guide me,

if c1a1 and if c1b1 then d1=0,
if c1a1 and if c1<b1 then d1=c1-b1
if c1<a1 and if c1<b1 then d1=a1-b1
and
if c1<a1 and c1b1 then d1=a1-c1
--
thanks and
rgds

amit