Using the "IF" function (I think)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is what I am trying to do... I have a spreadsheet with a lot of cells
with simple equations like =A1/A2 where in many cases A2 = 0. In my
spreadsheet they display as: #DIV/0! since the denominator of the
equation is 0. I would like to make it so that when the denominator in this
equation = 0, text that I choose is displayed, such as N/A . I think
this would be the IF function but I am not sure. How would I go about doing
this? If someone could provide a sample of what I need to type into the cell
to have this happen, I would appreciate it.

Thanks,
Chris
 
Or a slight variation:

=IF(A2=0,"n/a",A1/A2)

then if there is some other error this will show in the cell.

Hope this helps.

Pete
 
Thanks a lot kassie and Pete!

- Chris


Pete_UK said:
Or a slight variation:

=IF(A2=0,"n/a",A1/A2)

then if there is some other error this will show in the cell.

Hope this helps.

Pete
 
Back
Top