(Msg. 17) Posted: Fri Sep 04, 2009 11:43 am
Post subject: Re: Getting #DIV/0!, how to get 0%? [Login to view extended thread Info.] Archived from groups: microsoft>public>excel>misc (more info?)
Reading your solution to subject topic. I have a similar situation where
AO=units sold and AP=units returned. In trying to get the return rate
percentage, I must divide AP by AO. However, if 0 units sold and 1 unit
returned, what formula would give me the high return rate that I need to show
when I can't divide by 0? I was using the formula =IF(AP2=0,0,AP2/AO2). This
works for all except those with 0 in AO or units sold column. I need to see
at least a 100% return rate when AO=0 and AP=1 or more. Can you help?
Thank you.
"JE McGimpsey" wrote:
> You can't "show a % of increase", since it's mathematically undefined,
> but you can show a default value:
>
> =IF(C37=0, "undefined", J37/C37 - 1)
>
> or
>
> =IF(C37=0, 1, J37/C37 - 1)
>
>
>
> In article <A8AA6353-71E6-4506-B646-099FCC8F3766.DeleteThis@microsoft.com>,
> kaimarja <kaimarja.DeleteThis@discussions.microsoft.com> wrote:
>
> > Hi David, Thanks for the reply. Sorry for not being specific enough. Here are
> > the answers to your questions:
> >
> > I use the formula =(J37-C37)/ABS(C37), C being last years value and J being
> > this years value.
> > The value in C37 is 0 and the value in J37 is 70 .
> > The result cell is formatted to give a % and in all the other result cells
> > when the formula does not refer to cells containing 0, I get a correct answer
> > but not in the above case, where last year's cell contains a 0. The result
> > shows as #DIV/0!
> >
> > What I want is that when last year I had 0 and this year I have 70, the
> > result of my formula should show a % of increase.
> > I tried to copy and paste the formula you propose in your answer, but I
> > still get an error message from excel "The formula you typed contains an
> > error".
> >
> > Of course I understand I'm asking my formula to calculate a % of 0, which is
> > illogical, but I wondered whether there was a way around it.
>
(Msg. 18) Posted: Fri Sep 04, 2009 1:07 pm
Post subject: Re: Getting #DIV/0!, how to get 0%? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
You want:
=IF(AO2=0,1,AP2/AO2).
Format as percent
Regards,
Fred.
"K@MJP" <K@MJP@discussions.microsoft.com> wrote in message
news:257D9847-E3CC-40D2-A0C1-51714530A860@microsoft.com...
> Reading your solution to subject topic. I have a similar situation where
> AO=units sold and AP=units returned. In trying to get the return rate
> percentage, I must divide AP by AO. However, if 0 units sold and 1 unit
> returned, what formula would give me the high return rate that I need to
> show
> when I can't divide by 0? I was using the formula =IF(AP2=0,0,AP2/AO2).
> This
> works for all except those with 0 in AO or units sold column. I need to
> see
> at least a 100% return rate when AO=0 and AP=1 or more. Can you help?
>
> Thank you.
>
> "JE McGimpsey" wrote:
>
>> You can't "show a % of increase", since it's mathematically undefined,
>> but you can show a default value:
>>
>> =IF(C37=0, "undefined", J37/C37 - 1)
>>
>> or
>>
>> =IF(C37=0, 1, J37/C37 - 1)
>>
>>
>>
>> In article <A8AA6353-71E6-4506-B646-099FCC8F3766.TakeThisOut@microsoft.com>,
>> kaimarja <kaimarja.TakeThisOut@discussions.microsoft.com> wrote:
>>
>> > Hi David, Thanks for the reply. Sorry for not being specific enough.
>> > Here are
>> > the answers to your questions:
>> >
>> > I use the formula =(J37-C37)/ABS(C37), C being last years value and J
>> > being
>> > this years value.
>> > The value in C37 is 0 and the value in J37 is 70 .
>> > The result cell is formatted to give a % and in all the other result
>> > cells
>> > when the formula does not refer to cells containing 0, I get a correct
>> > answer
>> > but not in the above case, where last year's cell contains a 0. The
>> > result
>> > shows as #DIV/0!
>> >
>> > What I want is that when last year I had 0 and this year I have 70, the
>> > result of my formula should show a % of increase.
>> > I tried to copy and paste the formula you propose in your answer, but I
>> > still get an error message from excel "The formula you typed contains
>> > an
>> > error".
>> >
>> > Of course I understand I'm asking my formula to calculate a % of 0,
>> > which is
>> > illogical, but I wondered whether there was a way around it.
>>
(Msg. 19) Posted: Fri Sep 04, 2009 1:25 pm
Post subject: Re: Getting #DIV/0!, how to get 0%? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi Fred,
Thank you for your response. However, it's the AP2/AO2 where AO=0 that is
the problem. I believe that I resolved the issue using
=IF(AP2=0,0,IF(AO2=0,1,AP2/AO2). This seemed to result in the percentage I
was looking for. Your solution was the second part of the formula I ended up
using.
My best.
K@MJP
"Fred Smith" wrote:
> You want:
> =IF(AO2=0,1,AP2/AO2).
> Format as percent
>
> Regards,
> Fred.
>
> "K@MJP" <K@MJP@discussions.microsoft.com> wrote in message
> news:257D9847-E3CC-40D2-A0C1-51714530A860@microsoft.com...
> > Reading your solution to subject topic. I have a similar situation where
> > AO=units sold and AP=units returned. In trying to get the return rate
> > percentage, I must divide AP by AO. However, if 0 units sold and 1 unit
> > returned, what formula would give me the high return rate that I need to
> > show
> > when I can't divide by 0? I was using the formula =IF(AP2=0,0,AP2/AO2).
> > This
> > works for all except those with 0 in AO or units sold column. I need to
> > see
> > at least a 100% return rate when AO=0 and AP=1 or more. Can you help?
> >
> > Thank you.
> >
> > "JE McGimpsey" wrote:
> >
> >> You can't "show a % of increase", since it's mathematically undefined,
> >> but you can show a default value:
> >>
> >> =IF(C37=0, "undefined", J37/C37 - 1)
> >>
> >> or
> >>
> >> =IF(C37=0, 1, J37/C37 - 1)
> >>
> >>
> >>
> >> In article <A8AA6353-71E6-4506-B646-099FCC8F3766.DeleteThis@microsoft.com>,
> >> kaimarja <kaimarja.DeleteThis@discussions.microsoft.com> wrote:
> >>
> >> > Hi David, Thanks for the reply. Sorry for not being specific enough.
> >> > Here are
> >> > the answers to your questions:
> >> >
> >> > I use the formula =(J37-C37)/ABS(C37), C being last years value and J
> >> > being
> >> > this years value.
> >> > The value in C37 is 0 and the value in J37 is 70 .
> >> > The result cell is formatted to give a % and in all the other result
> >> > cells
> >> > when the formula does not refer to cells containing 0, I get a correct
> >> > answer
> >> > but not in the above case, where last year's cell contains a 0. The
> >> > result
> >> > shows as #DIV/0!
> >> >
> >> > What I want is that when last year I had 0 and this year I have 70, the
> >> > result of my formula should show a % of increase.
> >> > I tried to copy and paste the formula you propose in your answer, but I
> >> > still get an error message from excel "The formula you typed contains
> >> > an
> >> > error".
> >> >
> >> > Of course I understand I'm asking my formula to calculate a % of 0,
> >> > which is
> >> > illogical, but I wondered whether there was a way around it.
> >>
>
>
(Msg. 20) Posted: Fri Sep 04, 2009 6:10 pm
Post subject: Re: Getting #DIV/0!, how to get 0%? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Yes, your formula checked only AP2 for zero. But the error is dividing by
zero, so you need to check the divisor, AO2, for zero.
Regards,
Fred.
"K@MJP" <KMJP DeleteThis @discussions.microsoft.com> wrote in message
news:3F88B5C8-5B85-491A-AD9A-54EE851DC0CB@microsoft.com...
> Hi Fred,
>
> Thank you for your response. However, it's the AP2/AO2 where AO=0 that is
> the problem. I believe that I resolved the issue using
> =IF(AP2=0,0,IF(AO2=0,1,AP2/AO2). This seemed to result in the percentage I
> was looking for. Your solution was the second part of the formula I ended
> up
> using.
>
> My best.
> K@MJP
>
> "Fred Smith" wrote:
>
>> You want:
>> =IF(AO2=0,1,AP2/AO2).
>> Format as percent
>>
>> Regards,
>> Fred.
>>
>> "K@MJP" <K@MJP@discussions.microsoft.com> wrote in message
>> news:257D9847-E3CC-40D2-A0C1-51714530A860@microsoft.com...
>> > Reading your solution to subject topic. I have a similar situation
>> > where
>> > AO=units sold and AP=units returned. In trying to get the return rate
>> > percentage, I must divide AP by AO. However, if 0 units sold and 1 unit
>> > returned, what formula would give me the high return rate that I need
>> > to
>> > show
>> > when I can't divide by 0? I was using the formula =IF(AP2=0,0,AP2/AO2).
>> > This
>> > works for all except those with 0 in AO or units sold column. I need to
>> > see
>> > at least a 100% return rate when AO=0 and AP=1 or more. Can you help?
>> >
>> > Thank you.
>> >
>> > "JE McGimpsey" wrote:
>> >
>> >> You can't "show a % of increase", since it's mathematically undefined,
>> >> but you can show a default value:
>> >>
>> >> =IF(C37=0, "undefined", J37/C37 - 1)
>> >>
>> >> or
>> >>
>> >> =IF(C37=0, 1, J37/C37 - 1)
>> >>
>> >>
>> >>
>> >> In article <A8AA6353-71E6-4506-B646-099FCC8F3766 DeleteThis @microsoft.com>,
>> >> kaimarja <kaimarja DeleteThis @discussions.microsoft.com> wrote:
>> >>
>> >> > Hi David, Thanks for the reply. Sorry for not being specific enough.
>> >> > Here are
>> >> > the answers to your questions:
>> >> >
>> >> > I use the formula =(J37-C37)/ABS(C37), C being last years value and
>> >> > J
>> >> > being
>> >> > this years value.
>> >> > The value in C37 is 0 and the value in J37 is 70 .
>> >> > The result cell is formatted to give a % and in all the other result
>> >> > cells
>> >> > when the formula does not refer to cells containing 0, I get a
>> >> > correct
>> >> > answer
>> >> > but not in the above case, where last year's cell contains a 0. The
>> >> > result
>> >> > shows as #DIV/0!
>> >> >
>> >> > What I want is that when last year I had 0 and this year I have 70,
>> >> > the
>> >> > result of my formula should show a % of increase.
>> >> > I tried to copy and paste the formula you propose in your answer,
>> >> > but I
>> >> > still get an error message from excel "The formula you typed
>> >> > contains
>> >> > an
>> >> > error".
>> >> >
>> >> > Of course I understand I'm asking my formula to calculate a % of 0,
>> >> > which is
>> >> > illogical, but I wondered whether there was a way around it.
>> >>
>>
>>
(Msg. 21) Posted: Thu Oct 15, 2009 9:46 am
Post subject: iserror [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
ok, i have a formula that works but i want to have the cell blank when
nothing is in the other cells... =IF(ISERROR(F4/E4,0,F4/E4) which gives me
0.00 in cell G4. question is, what do i need to add to the formula to have
G4 blank until valves are added to cells F4 and E4... i.e. ,"", but i can't
get it right... any help?
(Msg. 22) Posted: Thu Oct 15, 2009 12:05 pm
Post subject: Re: iserror [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Maybe you can check for numbers:
=if(count(e4:f4)<2,"",if(e4=0,0,f4/e4))
And I only checked for a non-zero denominator.
dnmusic wrote:
>
> ok, i have a formula that works but i want to have the cell blank when
> nothing is in the other cells... =IF(ISERROR(F4/E4,0,F4/E4) which gives me
> 0.00 in cell G4. question is, what do i need to add to the formula to have
> G4 blank until valves are added to cells F4 and E4... i.e. ,"", but i can't
> get it right... any help?
(Msg. 23) Posted: Thu Oct 15, 2009 12:56 pm
Post subject: Re: iserror [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Maybe this:
=IF(COUNT(E4:F4)=2,F4/E4,"")
--
Biff
Microsoft Excel MVP
"dnmusic" <dnmusic.DeleteThis@discussions.microsoft.com> wrote in message
news:B9BFD310-CDE2-4BF3-8734-D02299EC441D@microsoft.com...
> ok, i have a formula that works but i want to have the cell blank when
> nothing is in the other cells... =IF(ISERROR(F4/E4,0,F4/E4) which gives
> me
> 0.00 in cell G4. question is, what do i need to add to the formula to
> have
> G4 blank until valves are added to cells F4 and E4... i.e. ,"", but i
> can't
> get it right... any help?
(Msg. 24) Posted: Fri Nov 06, 2009 10:33 am
Post subject: RE: Getting #DIV/0!, how to get 0%? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"Jim Thomlinson" wrote:
> Check e34 prior to dividing.
>
> if(e34 = 0, 0,(E34-D34)/E34)
> --
> HTH...
>
> Jim Thomlinson
>
>
> "pgarcia" wrote:
>
> > I'm getting #DIV/0! with the following formula, the cell is format as a
> > percent. Thanks
> >
> > =(E34-D34)/E34
> > E34 = 0
> > D34 = 0
> > Result should be 0%
All times are: Eastern Time (US & Canada) (change) Goto page Previous1, 2, 3, 4
Page 3 of 4
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum