null or 0 in a formula

d2023

New Member
Joined
Jun 11, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Help! I'm not the best at excel formulas and I have the following formula that I can't figure out how to make it PASS if cells F24 and F36 have a value entered between -25 and 25 yet FAIL if either of their values are NULL or blank.

=IF(AND(F11>=45,F11<=55,F13>=55,F13<=65,F14>=70,F14<=80,F15>=97,F15<=103,F17>=148,F17<=152,F23<=-975,F23>=-1025,-25<=F24,F24<=25,F25>=975,F25<=1025,F26>=1475,F26<=1525,F27>=4975,F27<=5025,F28>=9950,F28<=10050,F29>=14950,F29<=15050,F30>=19950,F30<=20050,F31>=14950,F31<=15050,F32>=9950,F32<=10050,F33>=4975,F33<=5025,F34>=1475,F34<=1525,F35>=975,F35<=1025,F36>=-25,F36<=25,L13>=2900,L13<=3100,L15>=1093,L15<=1093,L16>=4808,L16<=4808),"PASS","FAIL")
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
i have found the best value to use is test for "" , you can use isblank() but does not work if a formula is in the cell returning a blank ""

you could use a Nested IF

IF( OR( F24="",F36="") , "Fail", IF( your formula ) )
 
Upvote 0
Solution
Sheesh! That was so easy! Thanks etaf! I'm not even going to tell you what I have been trying. Unsuccessfully! lol

I do have another question about this formula. It's very long and very specific. Is there a better way to write the rest of the formula?
 
Upvote 0
not sure i follow the AND completely
AND(
F11>=45,F11<=55,
F13>=55,F13<=65,
F14>=70,F14<=80,
F15>=97,F15<=103,
F17>=148,F17<=152,
F23<=-975,F23>=-1025,-25<=F24,F24<=25,
F25>=975,F25<=1025,
F26>=1475,F26<=1525,
F27>=4975,F27<=5025,
F28>=9950,F28<=10050,
F29>=14950,F29<=15050,
F30>=19950,F30<=20050,
F31>=14950,F31<=15050,
F32>=9950,F32<=10050,
F33>=4975,F33<=5025,
F34>=1475,F34<=1525,
F35>=975,F35<=1025,
F36>=-25,F36<=25,
L13>=2900,L13<=3100,

These do not make sense -
L15>=1093,L15<=1093,
L16>=4808,L16<=4808

BUT not sure how to improve that with some sort of table or array
 
Upvote 0
In L15 and L16 I'm looking for the specific values of 1093 and 4808 to PASS. Any other value should FAIL.

With all the others I'm looking for values to fall between the two parameters to PASS. Any value outside the parameters should FAIL.
 
Upvote 0
then just use
L15=1093
L16=4808
dont need the >=<=
 
Upvote 0
Did I mention I'm not that good at excel formulas?

But you are! I appreciate all your help!
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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