ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Assigning a word to a number (https://www.excelbanter.com/excel-worksheet-functions/202746-assigning-word-number.html)

mj

Assigning a word to a number
 
Thank you for your assistance. I'm wondering how to recognize this as a
word, for instance.

(Cell A3) Apples -5
(Cell A4) Pears - 7
(Cell A5) Total - 12

I find the percentage by calculating 7/12 = 58%

Now, suppose there were no pears, that will be 0%. How do I change from 0%
to N/A on the cell?

Would that be... =A4/A5=If(NOT(A2<=0%), "xxxx", "N/A") on the same cell as
calculating 0/12?

Thanks!


Teethless mama

Assigning a word to a number
 
=IF(A4="","N/A",A4/A5)


"MJ" wrote:

Thank you for your assistance. I'm wondering how to recognize this as a
word, for instance.

(Cell A3) Apples -5
(Cell A4) Pears - 7
(Cell A5) Total - 12

I find the percentage by calculating 7/12 = 58%

Now, suppose there were no pears, that will be 0%. How do I change from 0%
to N/A on the cell?

Would that be... =A4/A5=If(NOT(A2<=0%), "xxxx", "N/A") on the same cell as
calculating 0/12?

Thanks!


mj

Assigning a word to a number
 
Thank you for your quick response! That helps! I entered what you wrote
(=IF(A4="", "N/A", A4/A5) , and it still came out as "$DIV/0!. Would it
work ... (=IF(A4="Zero, or 0.00% or 0.00","N/A, A4/A5)? Thanks again!

(I accidently press no to the post that helped me, which is my first time
using this.) I wanted to say it's been extremely helpful!

"Teethless mama" wrote:

=IF(A4="","N/A",A4/A5)


"MJ" wrote:

Thank you for your assistance. I'm wondering how to recognize this as a
word, for instance.

(Cell A3) Apples -5
(Cell A4) Pears - 7
(Cell A5) Total - 12

I find the percentage by calculating 7/12 = 58%

Now, suppose there were no pears, that will be 0%. How do I change from 0%
to N/A on the cell?

Would that be... =A4/A5=If(NOT(A2<=0%), "xxxx", "N/A") on the same cell as
calculating 0/12?

Thanks!


Teethless mama

Assigning a word to a number
 
Try this:
=IF(OR(A4="",A4=0),"N/A", A4/A5)


"MJ" wrote:

Thank you for your quick response! That helps! I entered what you wrote
(=IF(A4="", "N/A", A4/A5) , and it still came out as "$DIV/0!. Would it
work ... (=IF(A4="Zero, or 0.00% or 0.00","N/A, A4/A5)? Thanks again!

(I accidently press no to the post that helped me, which is my first time
using this.) I wanted to say it's been extremely helpful!

"Teethless mama" wrote:

=IF(A4="","N/A",A4/A5)


"MJ" wrote:

Thank you for your assistance. I'm wondering how to recognize this as a
word, for instance.

(Cell A3) Apples -5
(Cell A4) Pears - 7
(Cell A5) Total - 12

I find the percentage by calculating 7/12 = 58%

Now, suppose there were no pears, that will be 0%. How do I change from 0%
to N/A on the cell?

Would that be... =A4/A5=If(NOT(A2<=0%), "xxxx", "N/A") on the same cell as
calculating 0/12?

Thanks!


mj

Assigning a word to a number
 
Dear Teethless mama,

This formula worked! Can you explain why we are including the OR function
in this formula? Thanks!

MJ

"Teethless mama" wrote:

Try this:
=IF(OR(A4="",A4=0),"N/A", A4/A5)


"MJ" wrote:

Thank you for your quick response! That helps! I entered what you wrote
(=IF(A4="", "N/A", A4/A5) , and it still came out as "$DIV/0!. Would it
work ... (=IF(A4="Zero, or 0.00% or 0.00","N/A, A4/A5)? Thanks again!

(I accidently press no to the post that helped me, which is my first time
using this.) I wanted to say it's been extremely helpful!

"Teethless mama" wrote:

=IF(A4="","N/A",A4/A5)


"MJ" wrote:

Thank you for your assistance. I'm wondering how to recognize this as a
word, for instance.

(Cell A3) Apples -5
(Cell A4) Pears - 7
(Cell A5) Total - 12

I find the percentage by calculating 7/12 = 58%

Now, suppose there were no pears, that will be 0%. How do I change from 0%
to N/A on the cell?

Would that be... =A4/A5=If(NOT(A2<=0%), "xxxx", "N/A") on the same cell as
calculating 0/12?

Thanks!



All times are GMT +1. The time now is 12:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com