Simple Tricks with your curly brackets not working

rplim2016

Board Regular
Joined
Jun 28, 2016
Messages
76
Hi Mr. Excel users,

Good day!

2 samples below (BOTH WORKING)
-Original: =OR(WEEKDAY(A10)=1,WEEKDAY(A10)=7)
-Curly =OR(WEEKDAY(A10)={1,7})
I'm using Curly because of lesser LEN.

Curly #2 not working
-Original: =OR(B10="richard",B10="phoebe")
-Curly #1: =OR(B10={"richard","phoebe"})
-Curly #2=OR(B10={X1,X2})

Original and Curly #1 is both working, but to prevent hard coding. I prefer to reference cells range inside the Curly but, it's not working, is there a way for excel to read the Curly #2 above?

#1 My point of asking this question is to make the formula shorter and easy to read, specifically this is for OR and AND.
#2 Any tricks with curly brackets aside from CTRL + SHIFT + ENTER would be helpful.

Hope I make sense for asking this question. Have a great day!
 
Last edited:

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

Review the excel help file entry for "Guidelines and examples of array formulas', and scroll down to the 'Learn about array constants' section. You'll find the following:

[h=1]"Array constants can't contain additional arrays, formulas, or functions. In other words, they can contain only text or numbers that are separated by commas or semicolons. Excel displays a warning message when you enter a formula such as {1,2,A1:D4} or {1,2,SUM(Q2:Z8)}. Also, numeric values can't contain percent signs, dollar signs, commas, or parentheses."[/h]You'll need to do the or() longhand:

=or(b1=x1,b1=x2)
 
Upvote 0
Hi.

Review the excel help file entry for "Guidelines and examples of array formulas', and scroll down to the 'Learn about array constants' section. You'll find the following:

"Array constants can't contain additional arrays, formulas, or functions. In other words, they can contain only text or numbers that are separated by commas or semicolons. Excel displays a warning message when you enter a formula such as {1,2,A1:D4} or {1,2,SUM(Q2:Z8)}. Also, numeric values can't contain percent signs, dollar signs, commas, or parentheses."

You'll need to do the or() longhand:

=or(b1=x1,b1=x2)

Thank you, will read the thread you gave. :)
 
Upvote 0
If you have many names, instead of
=OR(B10="richard",B10="phoebe",B10="bob",B10="mary",B10=...,B10=...)

you can try something like
=ISNUMBER(MATCH(B10,MyList,0))
where MyList is a named range containing the names.

M.
 
Last edited:
Upvote 0
... I prefer to reference cells range inside the Curly but, it's not working, is there a way for excel to read the Curly #2 above?..
There is (with Ctrl+Shift+Enter):

=OR(B10=CHOOSE({1,2},X1,X2))

However, =OR(B10=X1,B10=X2) is shorter.
 
Upvote 0

Forum statistics

Threads
1,214,837
Messages
6,121,883
Members
449,057
Latest member
Moo4247

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