From: Cipri on 11 Apr 2010 08:26 Could anyone please help me with this situation (in Excel 2003): I have 2 cells A1 = 0 and B1 = 10 In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1= -10 but my question is: Is there a formula to calculate in C1 the result if the answer is positive and if the answer is negative to put 0? Thank you in advance.
From: מיכאל (מיקי) אבידן on 11 Apr 2010 08:41 Try one of two: =(A1-B1)*(A1>B1) =(A1-B1)*(A1>=B1) Micky "Cipri" wrote: > Could anyone please help me with this situation (in Excel 2003): > I have 2 cells > A1 = 0 and B1 = 10 > In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1= > -10 but my question is: > Is there a formula to calculate in C1 the result if the answer is positive > and if the answer is negative to put 0? > > Thank you in advance.
From: Cipri on 11 Apr 2010 08:49 It worked your solution and in the mean time i found another one that works too :) if(A1<B1,"0",A1-B1) Thx dude "מיכאל (מיקי) אבידן" wrote: > Try one of two: > =(A1-B1)*(A1>B1) > =(A1-B1)*(A1>=B1) > Micky > > > > "Cipri" wrote: > > > Could anyone please help me with this situation (in Excel 2003): > > I have 2 cells > > A1 = 0 and B1 = 10 > > In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1= > > -10 but my question is: > > Is there a formula to calculate in C1 the result if the answer is positive > > and if the answer is negative to put 0? > > > > Thank you in advance.
From: Bernard Liengme on 11 Apr 2010 09:43 But do not put the zero in quotes, that will make it text if(A1<B1,0,A1-B1) best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "Cipri" <Cipri(a)discussions.microsoft.com> wrote in message news:418D6324-D0B3-43D8-AC13-86B3931F6196(a)microsoft.com... > It worked your solution and in the mean time i found another one that > works > too :) > if(A1<B1,"0",A1-B1) > > Thx dude > > "מיכאל (מיקי) אבידן" wrote: > >> Try one of two: >> =(A1-B1)*(A1>B1) >> =(A1-B1)*(A1>=B1) >> Micky >> >> >> >> "Cipri" wrote: >> >> > Could anyone please help me with this situation (in Excel 2003): >> > I have 2 cells >> > A1 = 0 and B1 = 10 >> > In cell C1 i put this formula C1=A1-B1 . Now the answer will be >> > C1= >> > -10 but my question is: >> > Is there a formula to calculate in C1 the result if the answer is >> > positive >> > and if the answer is negative to put 0? >> > >> > Thank you in advance.
From: "David Biddulph" groups [at] on 11 Apr 2010 09:54 =MAX(0,A1-B1) -- David Biddulph "Cipri" <Cipri(a)discussions.microsoft.com> wrote in message news:177EC4F4-53AF-476F-AE61-EB6E695B2801(a)microsoft.com... > Could anyone please help me with this situation (in Excel 2003): > I have 2 cells > A1 = 0 and B1 = 10 > In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1= > -10 but my question is: > Is there a formula to calculate in C1 the result if the answer is positive > and if the answer is negative to put 0? > > Thank you in advance.
|
Pages: 1 Prev: Copy function. Next: Number of characters to be displayed in a cell |