![]() |
Using the "IF" function (I think)
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 |
Using the "IF" function (I think)
=IF(ISERROR(A1/A2),"N/A",A1/A2)
"Chris from Boston" wrote: 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 |
Using the "IF" function (I think)
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 kassie wrote: =IF(ISERROR(A1/A2),"N/A",A1/A2) "Chris from Boston" wrote: 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 |
Using the "IF" function (I think)
Thanks a lot kassie and Pete!
- Chris "Pete_UK" wrote: 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 kassie wrote: =IF(ISERROR(A1/A2),"N/A",A1/A2) "Chris from Boston" wrote: 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 |
All times are GMT +1. The time now is 10:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com