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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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