"IF" function for 3 variables

Can I use the "IF" function for 3 variables? 

The cell in question may contain "Major", "Minor", or "NL". I want the function to output "97%", "93%", or "100%", depending on the cell content. I must be making a basic mistake, but I cannot identify my error.

Thanks for the assistance.

Answer
Answer

Several solutions - using what you started

=IF(A1="Major",0.97,IF(A1="Minor",0.93,IF(A1="NL",1,"")))

 

 

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Answer
Answer
JGyrine wrote:

Can I use the "IF" function for 3 variables? 

The cell in question may contain "Major", "Minor", or "NL". I want the function to output "97%", "93%", or "100%", depending on the cell content. I must be making a basic mistake, but I cannot identify my error.


Neither can we, since you did not show us your formula (or VBA function?!).

One question:  What do you want the result to be if the cell value does not match any of those three?

Perhaps the following will work for you:

=IF(A1="Major",97%,IF(A1="Minor",93%,IF(A1="NL",100%,0)))

formatted as Percentage with 0 decimal places.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 30, 2022 Views 1,898 Applies to: