#1   Report Post  
jacob
 
Posts: n/a
Default Divison by 0

A lot of the data i deal with involves counting and dividing. A percentage
may be presented in the worksheet. Instead of #DIV/0!, I would like for N/A,
not available, to appear in the cell. How do i create a formula of sorts that
will display the average, for example, or N/A if there is division by 0.

This will help me a lot because i won't have to look over hundreds of cells
to spot all the divison by zero errors and i don't have to worry about
recalculations not appearing because formulas have been deleted to put N/A in
the cells

Thanks very much!
  #2   Report Post  
Vasant Nanavati
 
Posts: n/a
Default

If the dividend and the divisor are in cells A1 and B1:

=IF(B1=0,"N/A",A1/B1)

--

Vasant


"jacob" wrote in message
...
A lot of the data i deal with involves counting and dividing. A percentage
may be presented in the worksheet. Instead of #DIV/0!, I would like for

N/A,
not available, to appear in the cell. How do i create a formula of sorts

that
will display the average, for example, or N/A if there is division by 0.

This will help me a lot because i won't have to look over hundreds of

cells
to spot all the divison by zero errors and i don't have to worry about
recalculations not appearing because formulas have been deleted to put N/A

in
the cells

Thanks very much!



  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Assume the div error is because B2 is empty in =A2/B2

Then you could use =IF(B2=0,NA(),A2/B2)

or

=IF(B2=0,"",A2/B2)

--
Regards,

Peo Sjoblom


"jacob" wrote in message
...
A lot of the data i deal with involves counting and dividing. A percentage
may be presented in the worksheet. Instead of #DIV/0!, I would like for
N/A,
not available, to appear in the cell. How do i create a formula of sorts
that
will display the average, for example, or N/A if there is division by 0.

This will help me a lot because i won't have to look over hundreds of
cells
to spot all the divison by zero errors and i don't have to worry about
recalculations not appearing because formulas have been deleted to put N/A
in
the cells

Thanks very much!


  #4   Report Post  
Robert Christie
 
Posts: n/a
Default

Hi Peo

The () after NA in your formula produces a #N/A answer for each zero in
columnB.
Has the # any purpose as apposed to just N/A?

TIA

Aussie Bob C.

"Peo Sjoblom" wrote:

Assume the div error is because B2 is empty in =A2/B2

Then you could use =IF(B2=0,NA(),A2/B2)

or

=IF(B2=0,"",A2/B2)

--
Regards,

Peo Sjoblom


"jacob" wrote in message
...
A lot of the data i deal with involves counting and dividing. A percentage
may be presented in the worksheet. Instead of #DIV/0!, I would like for
N/A,
not available, to appear in the cell. How do i create a formula of sorts
that
will display the average, for example, or N/A if there is division by 0.

This will help me a lot because i won't have to look over hundreds of
cells
to spot all the divison by zero errors and i don't have to worry about
recalculations not appearing because formulas have been deleted to put N/A
in
the cells

Thanks very much!



  #5   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

It returns a true error as opposed to a text version which would be "N/A"

If you are doing average calculations you should go for the text version
since average ignores text and has to be changed to cope with errors


--
Regards,

Peo Sjoblom


"Robert Christie" wrote in message
...
Hi Peo

The () after NA in your formula produces a #N/A answer for each zero in
columnB.
Has the # any purpose as apposed to just N/A?

TIA

Aussie Bob C.

"Peo Sjoblom" wrote:

Assume the div error is because B2 is empty in =A2/B2

Then you could use =IF(B2=0,NA(),A2/B2)

or

=IF(B2=0,"",A2/B2)

--
Regards,

Peo Sjoblom


"jacob" wrote in message
...
A lot of the data i deal with involves counting and dividing. A
percentage
may be presented in the worksheet. Instead of #DIV/0!, I would like
for
N/A,
not available, to appear in the cell. How do i create a formula of
sorts
that
will display the average, for example, or N/A if there is division by
0.

This will help me a lot because i won't have to look over hundreds of
cells
to spot all the divison by zero errors and i don't have to worry about
recalculations not appearing because formulas have been deleted to put
N/A
in
the cells

Thanks very much!




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



All times are GMT +1. The time now is 08:01 PM.

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"