View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Multiple logical formula

Your welcome and thaks for the feedback. Just one point you need to consider
what you want to happen if c1 = a1& b1 because you don't specify this. In my
formula this condition returns 'Unspecified"

Mike

"spaceage" wrote:

Great help Mike, thanks a million.
--
rgds


"Mike" wrote:

Try this: in D1

=IF(AND(C1A1,C1B1),0,IF(AND(C1A1,C1<B1),C1-B1,IF(AND(C1<A1,C1<B1),A1-B1,IF(AND(C1<A1,C1B1),A1-C1,"Unspecified"))))

Will that do?

Mike

"spaceage" wrote:

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