WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Getting #DIV/0!, how to get 0%?

 
Goto page Previous  1, 2, 3, 4
   Home -> Office -> General Discussions RSS
Next:  Sorting  
Author Message
David Biddulph

External


Since: Feb 24, 2007
Posts: 4191



(Msg. 9) Posted: Mon Sep 17, 2007 8:43 pm
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?)

=IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))

Note that with the formulae which some other contributors have suggested,
you would get the same answer for an input of D34=99 and E34=0 as you would
get for D34 and E34 both 99. Is that what you want?
--
David Biddulph

"pgarcia" <pgarcia RemoveThis @discussions.microsoft.com> wrote in message
news:F777B88C-63AF-4202-8F40-6218195C2EE1@microsoft.com...
> 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%
Back to top
Login to vote
kaimarja

External


Since: May 07, 2008
Posts: 2



(Msg. 10) Posted: Wed May 07, 2008 2:38 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?)

Hi David,
I have the same problem as above, but my formula is slightly different:
=(J37-C37)/ABS(C37). I compare two values and want to get the percentage of
increase or decrease between the two. Sometimes one of the values (or both)
is zero, and then it gives an error. I Tried the advice given above but I
must do something wrong as it still gives an error. Thanks for helping me.
Kaimarja

"David Biddulph" wrote:

> =IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))
>
> Note that with the formulae which some other contributors have suggested,
> you would get the same answer for an input of D34=99 and E34=0 as you would
> get for D34 and E34 both 99. Is that what you want?
> --
> David Biddulph
>
> "pgarcia" <pgarcia.DeleteThis@discussions.microsoft.com> wrote in message
> news:F777B88C-63AF-4202-8F40-6218195C2EE1@microsoft.com...
> > 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%
>
>
>
Back to top
Login to vote
David Biddulph

External


Since: Feb 24, 2007
Posts: 4191



(Msg. 11) Posted: Wed May 07, 2008 12:38 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?)

"... it still gives an error" isn't very specific. You haven't told us what
formula you are using, so we can't tell you what you've done wrong.

If instead of =(E34-D34)/E34 you wanted to start from =(J37-C37)/ABS(C37),
then instead of
=IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))
you would end up with
=IF(J37-C37=0,0,IF(C37=0,"infinite % difference",(J37-C37)/ABS(C37)))
If you want the result as a percentage, format the cell with a percentage
format to suit your requirements.
Is that the formula you were using? If so, what input values did you have
in J37 and C37, what result did you get, and what result did you expect?
--
David Biddulph

"kaimarja" <kaimarja RemoveThis @discussions.microsoft.com> wrote in message
news:AFC950EF-3E4D-422E-8B91-DF1956574F94@microsoft.com...
> Hi David,
> I have the same problem as above, but my formula is slightly different:
> =(J37-C37)/ABS(C37). I compare two values and want to get the percentage
> of
> increase or decrease between the two. Sometimes one of the values (or
> both)
> is zero, and then it gives an error. I Tried the advice given above but I
> must do something wrong as it still gives an error. Thanks for helping me.
> Kaimarja
>
> "David Biddulph" wrote:
>
>> =IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))
>>
>> Note that with the formulae which some other contributors have suggested,
>> you would get the same answer for an input of D34=99 and E34=0 as you
>> would
>> get for D34 and E34 both 99. Is that what you want?
>> --
>> David Biddulph
>>
>> "pgarcia" <pgarcia RemoveThis @discussions.microsoft.com> wrote in message
>> news:F777B88C-63AF-4202-8F40-6218195C2EE1@microsoft.com...
>> > 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%
>>
>>
>>
Back to top
Login to vote
kaimarja

External


Since: May 07, 2008
Posts: 2



(Msg. 12) Posted: Thu May 08, 2008 5:06 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?)

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.

Thanks for your help.
Kai

"David Biddulph" wrote:

> "... it still gives an error" isn't very specific. You haven't told us what
> formula you are using, so we can't tell you what you've done wrong.
>
> If instead of =(E34-D34)/E34 you wanted to start from =(J37-C37)/ABS(C37),
> then instead of
> =IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))
> you would end up with
> =IF(J37-C37=0,0,IF(C37=0,"infinite % difference",(J37-C37)/ABS(C37)))
> If you want the result as a percentage, format the cell with a percentage
> format to suit your requirements.
> Is that the formula you were using? If so, what input values did you have
> in J37 and C37, what result did you get, and what result did you expect?
> --
> David Biddulph
>
> "kaimarja" <kaimarja.TakeThisOut@discussions.microsoft.com> wrote in message
> news:AFC950EF-3E4D-422E-8B91-DF1956574F94@microsoft.com...
> > Hi David,
> > I have the same problem as above, but my formula is slightly different:
> > =(J37-C37)/ABS(C37). I compare two values and want to get the percentage
> > of
> > increase or decrease between the two. Sometimes one of the values (or
> > both)
> > is zero, and then it gives an error. I Tried the advice given above but I
> > must do something wrong as it still gives an error. Thanks for helping me.
> > Kaimarja
> >
> > "David Biddulph" wrote:
> >
> >> =IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))
> >>
> >> Note that with the formulae which some other contributors have suggested,
> >> you would get the same answer for an input of D34=99 and E34=0 as you
> >> would
> >> get for D34 and E34 both 99. Is that what you want?
> >> --
> >> David Biddulph
> >>
> >> "pgarcia" <pgarcia.TakeThisOut@discussions.microsoft.com> wrote in message
> >> news:F777B88C-63AF-4202-8F40-6218195C2EE1@microsoft.com...
> >> > 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%
> >>
> >>
> >>
>
>
>
Back to top
Login to vote
JE McGimpsey

External


Since: Feb 05, 2004
Posts: 1373



(Msg. 13) Posted: Thu May 08, 2008 6:14 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?)

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.
Back to top
Login to vote
David Biddulph

External


Since: Feb 24, 2007
Posts: 4191



(Msg. 14) Posted: Thu May 08, 2008 3:22 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?)

If you copied and pasted (rather than retyped) my formula
=IF(J37-C37=0,0,IF(C37=0,"infinite % difference",(J37-C37)/ABS(C37))) and
Excel reported "The formula you typed contains an error", then I can only
assume that you are working with Windows Regional Options that are looking
for a semi-colon, rather than a comma, as a list separator?
If so, you ought to use
=IF(J37-C37=0;0;IF(C37=0;"infinite % difference";(J37-C37)/ABS(C37)))

If you are still getting a problem, copy and paste the formula from your
formula bar to the newsgroup.

You are right that a percentage of zero is illogical, hence the various
suggestions for reporting the situation, such as my "infinite % difference"
result.
--
David Biddulph

"kaimarja" <kaimarja.TakeThisOut@discussions.microsoft.com> wrote in message
news:A8AA6353-71E6-4506-B646-099FCC8F3766@microsoft.com...
> 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.
>
> Thanks for your help.
> Kai
>
> "David Biddulph" wrote:
>
>> "... it still gives an error" isn't very specific. You haven't told us
>> what
>> formula you are using, so we can't tell you what you've done wrong.
>>
>> If instead of =(E34-D34)/E34 you wanted to start from
>> =(J37-C37)/ABS(C37),
>> then instead of
>> =IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))
>> you would end up with
>> =IF(J37-C37=0,0,IF(C37=0,"infinite % difference",(J37-C37)/ABS(C37)))
>> If you want the result as a percentage, format the cell with a percentage
>> format to suit your requirements.
>> Is that the formula you were using? If so, what input values did you
>> have
>> in J37 and C37, what result did you get, and what result did you expect?
>> --
>> David Biddulph
>>
>> "kaimarja" <kaimarja.TakeThisOut@discussions.microsoft.com> wrote in message
>> news:AFC950EF-3E4D-422E-8B91-DF1956574F94@microsoft.com...
>> > Hi David,
>> > I have the same problem as above, but my formula is slightly different:
>> > =(J37-C37)/ABS(C37). I compare two values and want to get the
>> > percentage
>> > of
>> > increase or decrease between the two. Sometimes one of the values (or
>> > both)
>> > is zero, and then it gives an error. I Tried the advice given above but
>> > I
>> > must do something wrong as it still gives an error. Thanks for helping
>> > me.
>> > Kaimarja
>> >
>> > "David Biddulph" wrote:
>> >
>> >> =IF(E34-D34=0,0,IF(E34=0,"infinite % difference",(E34-D34)/E34))
>> >>
>> >> Note that with the formulae which some other contributors have
>> >> suggested,
>> >> you would get the same answer for an input of D34=99 and E34=0 as you
>> >> would
>> >> get for D34 and E34 both 99. Is that what you want?
>> >> --
>> >> David Biddulph
>> >>
>> >> "pgarcia" <pgarcia.TakeThisOut@discussions.microsoft.com> wrote in message
>> >> news:F777B88C-63AF-4202-8F40-6218195C2EE1@microsoft.com...
>> >> > 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%
>> >>
>> >>
>> >>
>>
>>
>>
Back to top
Login to vote
Jim

External


Since: Sep 11, 2004
Posts: 503



(Msg. 15) Posted: Tue Feb 10, 2009 8:24 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?)

This formula is all fine and dandy to get zero... now what about when you put
numbers in those boxes... it still returns zero
Back to top
Login to vote
David Biddulph

External


Since: Feb 24, 2007
Posts: 4191



(Msg. 16) Posted: Tue Feb 10, 2009 1:05 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 haven't told us which formula, so we can't help you.
If you are referring to a formula in a previous message, you need to quote
enough of the previous message(s) to put your reply into context.
--
David Biddulph

"Jim" <Jim.RemoveThis@discussions.microsoft.com> wrote in message
news:AB5D4A7A-57EF-41AC-AA0F-52E099EB086D@microsoft.com...
> This formula is all fine and dandy to get zero... now what about when you
> put
> numbers in those boxes... it still returns zero
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> General Discussions All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2, 3, 4
Page 2 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support