Ranges in AND or OR (nice and simple Q)

Willb

New Member
Joined
May 1, 2007
Messages
15
Hi guys,

Is there any way to use ranges in AND and OR?

For example:

Currently using: OR(A1="",B1="",C1="",D1="")

Would like to use something to the effect of: OR(A1:D1="")

Is this possible? (keeping in mind I want to use less code)

Cheers
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You might want to use COUNTIF

COUNTIF(A1:D1,"") will return the number of blanks in the range. Then you can just nest that into an IF function to determine if it is greater than zero.
 
Upvote 0
Currently using: OR(A1="",B1="",C1="",D1="")

Would like to use something to the effect of: OR(A1:D1="")

Hi

You can use your formula:

=OR(A1:D1="")

but since it's an array formula you have to confirm it with CTRL-SHIFT-ENTER instead of just ENTER.
 
Upvote 0
Thanks for the replies guys,

PCG01, do the use of array formulas increase Excel's processing speed?

This part of the formula is repeated thousands of times in a call centre roster that we use, so I'm trying to decrease characters and obviously loading times etc
 
Upvote 0
Thanks for the replies guys,

PCG01, do the use of array formulas increase Excel's processing speed?

This part of the formula is repeated thousands of times in a call centre roster that we use, so I'm trying to decrease characters and obviously loading times etc

No, they usually decrease Excel's processing speed.

This is an equivalent non-array formula:

=COUNTBLANK(A1:D1)<>0

I'm just leaving, but you may test the options and check which one works faster.
 
Upvote 0

Forum statistics

Threads
1,215,003
Messages
6,122,655
Members
449,091
Latest member
peppernaut

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