Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Percentage equals 0 error

I know if I ask for the percentage of =G44/H44 and both columns contain a 0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there anyway to
override that and display 0% until I actually get the numbers in there from a
database query I need to run, which may be later in the year?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Percentage equals 0 error

One way...

=IF(OR(H44=0,COUNT(G44:H44)<2),0,G44/H44)

--
Biff
Microsoft Excel MVP


"Richard Horn" wrote in message
...
I know if I ask for the percentage of =G44/H44 and both columns contain a
0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there anyway to
override that and display 0% until I actually get the numbers in there
from a
database query I need to run, which may be later in the year?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 186
Default Percentage equals 0 error

Try =IF(ISERROR(G44/H44),0,G44/H44)

--
Ken Hudson


"Richard Horn" wrote:

I know if I ask for the percentage of =G44/H44 and both columns contain a 0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there anyway to
override that and display 0% until I actually get the numbers in there from a
database query I need to run, which may be later in the year?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Percentage equals 0 error

Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]
--
David Biddulph


"T. Valko" wrote in message
...
One way...

=IF(OR(H44=0,COUNT(G44:H44)<2),0,G44/H44)

--
Biff
Microsoft Excel MVP


"Richard Horn" wrote in message
...
I know if I ask for the percentage of =G44/H44 and both columns contain a
0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there anyway
to
override that and display 0% until I actually get the numbers in there
from a
database query I need to run, which may be later in the year?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Percentage equals 0 error

Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]


Yes, but you could also get away with just this if you wanted to:

=IF(H44,G44/H44,0)

That's why the first line in my reply was:

One way...


--
Biff
Microsoft Excel MVP


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]
--
David Biddulph


"T. Valko" wrote in message
...
One way...

=IF(OR(H44=0,COUNT(G44:H44)<2),0,G44/H44)

--
Biff
Microsoft Excel MVP


"Richard Horn" wrote in message
...
I know if I ask for the percentage of =G44/H44 and both columns contain a
0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there anyway
to
override that and display 0% until I actually get the numbers in there
from a
database query I need to run, which may be later in the year?








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Percentage equals 0 error

"T. Valko" wrote
in response to "David Biddulph" <groups [at] biddulph.org.uk:
Can't you get away with just =IF(H44=0,0,G44/H44) ?

[....]
Yes, but you could also get away with just this
if you wanted to:
=IF(H44,G44/H44,0)


That returns an error if H44 is the null string. I thought that might be
why you had included the COUNT condition. But the following covers both
adequately:

=IF(N(H44),N(G44)/H44,0)


----- original message -----

"T. Valko" wrote in message
...
Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]


Yes, but you could also get away with just this if you wanted to:

=IF(H44,G44/H44,0)

That's why the first line in my reply was:

One way...


--
Biff
Microsoft Excel MVP


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]
--
David Biddulph


"T. Valko" wrote in message
...
One way...

=IF(OR(H44=0,COUNT(G44:H44)<2),0,G44/H44)

--
Biff
Microsoft Excel MVP


"Richard Horn" wrote in message
...
I know if I ask for the percentage of =G44/H44 and both columns contain
a 0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there anyway
to
override that and display 0% until I actually get the numbers in there
from a
database query I need to run, which may be later in the year?






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Percentage equals 0 error

Good grief!

What part of "one way" don't you folks understand? <bg

<bg means "big grin". As in a big joking #$%^ eating grin.

--
Biff
Microsoft Excel MVP


"Joe User" <joeu2004 wrote in message
...
"T. Valko" wrote
in response to "David Biddulph" <groups [at] biddulph.org.uk:
Can't you get away with just =IF(H44=0,0,G44/H44) ?

[....]
Yes, but you could also get away with just this
if you wanted to:
=IF(H44,G44/H44,0)


That returns an error if H44 is the null string. I thought that might be
why you had included the COUNT condition. But the following covers both
adequately:

=IF(N(H44),N(G44)/H44,0)


----- original message -----

"T. Valko" wrote in message
...
Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]


Yes, but you could also get away with just this if you wanted to:

=IF(H44,G44/H44,0)

That's why the first line in my reply was:

One way...


--
Biff
Microsoft Excel MVP


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]
--
David Biddulph


"T. Valko" wrote in message
...
One way...

=IF(OR(H44=0,COUNT(G44:H44)<2),0,G44/H44)

--
Biff
Microsoft Excel MVP


"Richard Horn" wrote in message
...
I know if I ask for the percentage of =G44/H44 and both columns contain
a 0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there
anyway to
override that and display 0% until I actually get the numbers in there
from a
database query I need to run, which may be later in the year?








  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Percentage equals 0 error

"T. Valko" wrote:
Good grief!
What part of "one way" don't you folks understand? <bg


Next time I'll write "here's another way" or "here's an improvement" for
those who don't get that that is implicit as always. <bg


----- original message -----

"T. Valko" wrote in message
...
Good grief!

What part of "one way" don't you folks understand? <bg

<bg means "big grin". As in a big joking #$%^ eating grin.

--
Biff
Microsoft Excel MVP


"Joe User" <joeu2004 wrote in message
...
"T. Valko" wrote
in response to "David Biddulph" <groups [at] biddulph.org.uk:
Can't you get away with just =IF(H44=0,0,G44/H44) ?

[....]
Yes, but you could also get away with just this
if you wanted to:
=IF(H44,G44/H44,0)


That returns an error if H44 is the null string. I thought that might be
why you had included the COUNT condition. But the following covers both
adequately:

=IF(N(H44),N(G44)/H44,0)


----- original message -----

"T. Valko" wrote in message
...
Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]

Yes, but you could also get away with just this if you wanted to:

=IF(H44,G44/H44,0)

That's why the first line in my reply was:

One way...

--
Biff
Microsoft Excel MVP


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Can't you get away with just =IF(H44=0,0,G44/H44) ?
[Unless, of course, there is text in G44?]
--
David Biddulph


"T. Valko" wrote in message
...
One way...

=IF(OR(H44=0,COUNT(G44:H44)<2),0,G44/H44)

--
Biff
Microsoft Excel MVP


"Richard Horn" wrote in
message ...
I know if I ask for the percentage of =G44/H44 and both columns
contain a 0,
or H44 contains a 0, Excel will return a #DIV/0! error. Is there
anyway to
override that and display 0% until I actually get the numbers in
there from a
database query I need to run, which may be later in the year?









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count if equals first non error cell John Excel Worksheet Functions 6 January 12th 10 05:51 PM
Validation - Error message if equals Left formula JICDB Excel Worksheet Functions 6 October 29th 07 08:45 PM
If a cell equals _, at the next row that equals _, return value fr CathyH Excel Worksheet Functions 10 May 2nd 07 07:53 PM
if a:a (range) equals january and c:c equals gas then add g:g ($) BCOz Excel Worksheet Functions 4 December 29th 05 07:40 PM
custom filter does not work when selecting 'equals' X AND 'equals' plindman Excel Discussion (Misc queries) 1 June 1st 05 11:29 PM


All times are GMT +1. The time now is 06:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"