More efficient conditional check than nested ANDs in an IF(OR

kcmuppet

Active Member
Joined
Nov 2, 2005
Messages
437
Office Version
  1. 365
Platform
  1. Windows
Is there a shorter / more efficient formula for doing than like this?:

Excel Formula:
=IF(OR(AND(C7<>"",C8=""), AND(C9<>"",C10=""), AND(C11<>"",C12="")), "Check!","Carry on")

I'm flagging if there's a an entry in a cell in one row, but nothing in the corresponding cell in the same column in the next row.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
There might be an obscure "tricky" way to do this and make it shorter, but there is nothing about this formula that needs to be fixed. It is straightforward, it is clear to anyone who reads it what is doing, and it will be easy to update if you ever need to change it.

The reason that shortening it would be tricky is that the cells you are checking for <>"" are discontiguous, and the cells you are checking for ="" are discontiguous. Otherwise an array formula might be shorter. But even so, there would nothing inherently better about it.

The only thing I would consider is making it longer to indicate specifically which cells have the problem.
Excel Formula:
=IF(AND(C7<>"",C8=""),"Check C8 ","")&IF(AND(C9<>"",C10=""), "Check C9 ","")&IF(AND(C11<>"",C12=""), "Check C11 ","")
Actually, I would use three different formulas in three cells, instead of mashing them together.
 
Upvote 1

Forum statistics

Threads
1,215,330
Messages
6,124,305
Members
449,150
Latest member
NyDarR

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