Formula not working

coleyoder

New Member
Joined
Nov 29, 2018
Messages
9
I put this formula in my spreadsheet to help put "pass" or "passes" according to the number on the cell I chose to use.

here is the formula:

=IF(M2="1","Pass",IF(M2="2","Passes",IF(M2="3","Passes",IF(M2="4","Passes",IF(M2="5","Passes",IF(M2="6","Passes",IF(M2="7","Passes",IF(M2="8","Passes",IF(M2="9","Passes",IF(M2="10","Passes",IF(M2="11","Passes",IF(M2="12","Passes",IF(M2="13","Passes",IF(M2="14","Passes",IF(M2="15","Passes",IF(M2="16","Passes",IF(M2="17","Passes","")))))))))))))))))


If anyone sees anything wrong or can help me understand why it isn't working that would be greatly appreciated.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
If M2 is a number then you need to remove the quotes around "1", "2" etc.
Another way of doing it would be
=IF(M2=1,"Pass",IF(AND(M2>1,M2<=17),"Passes",""))
 
Upvote 0
how about

=if(M2=1,"Pass",if(M2<=17,"Passes",""))
 
Upvote 0
If M2 is a number then you need to remove the quotes around "1", "2" etc.
Another way of doing it would be
=IF(M2=1,"Pass",IF(AND(M2>1,M2<=17),"Passes",""))


Figured it out everyone!

Thanks for the advice it was super helpful
 
Upvote 0
Glad it's sorted & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top