# OR() Function

#### mmartin

##### New Member
Hi,
can the OR() Function be used over cell ranges?

I'm trying the following :

=OR((Z3:BZ3="F"))

. . . and the result is :

#VALUE!

Cheers

### Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

#### Andrew Poulsom

##### MrExcel MVP
Yes, but you must press Ctrl+Shift Enter, rather than just Enter. If correctly entered Excel will surround the array formula with curly braces {}.

An alternative normal formula:

=COUNTIF(Z3:BZ3,"F")>0

#### njimack

##### Well-known Member
Are you trying to count the number of cells in the range that equal F, or are you testing that ANY of the cells in the range equal F?

To count the no. of cells which equal F: =COUNTIF(Z3:BZ3,"F")
To count the no. of cells which CONTAIN F: =COUNTIF(Z3:BZ3,"*F*")
To test whether ANY of the cells equal F:=COUNTIF(Z3:BZ3,"F")>0 (returns TRUE/FALSE)

#### Jonmo1

##### MrExcel MVP
For What Purpose ?

Exactly as you wrote it, no it can't be used that way..

Are you trying to See if F exists in the range Z3:BZ3 ?

=COUNTIF(Z3:BZ3,"F")>0

Will return TRUE if F exists anywhere in the range
remove the >0 to get the count of HOW MANY Fs are in the range...

Hope this helps..

#### mmartin

##### New Member
Hi All,
apologies - I should have been clearer - I was indeed trying to test for the presence of F in the range.

Your suggestions worked perfectly. Many Thanks
Cheers!

Replies
4
Views
250
Replies
6
Views
327
Replies
2
Views
470
Replies
3
Views
674
Replies
11
Views
246

1,191,178
Messages
5,985,142
Members
439,942
Latest member
bkexcel11230

### 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.

### Which adblocker are you using?

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

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