How to shorten formula for multiple OR conditions

SanjayGMusafir

Well-known Member
Joined
Sep 7, 2018
Messages
1,462
Office Version
  1. 2021
Platform
  1. MacOS
Hi Experts
I have this formula that tests multiple OR conditions to give result.

Can we shorten this formula?
Where we don't need to repeatedly write [@Refer]
or
If we can make a list and formula may check that list to test OR condition?


I believe I saw someone using a shorter way to write similar thing on this forum itself but with growing age unable to recall what exactly that was...

Excel Formula:
=IFS(OR([@Refer]="AKG",[@Refer]="RPG",[@Refer]="MGG",[@Refer]="Ish, Sonepat",[@Refer]="Nidhi, Khanna",[@Refer]="Ankush, LxmNgr",[@Refer]="BHMS",[@Refer]="Billa, Jldr",[@Refer]="Bittoo, Gzb",[@Refer]="BVB",[@Refer]="Chauhan, Asr",[@Refer]="Didi",[@Refer]="Reeta, Gzb",[@Refer]="Ginni, Rhn",[@Refer]="GurpreetS AmbVhr",[@Refer]="Janu",[@Refer]="Jappi, RjrGdn",[@Refer]="Jitender, Jpr",[@Refer]="JoginderS, PVhr",[@Refer]="Jyoti, Takshila",[@Refer]="Monga AshkVhr",[@Refer]="Network 21",[@Refer]="Nightingale, SFA",[@Refer]="Pintoo, MwlNgr",[@Refer]="PPrakash, GH13",[@Refer]="Raju, NMkt",[@Refer]="Rampal Chhatwal",[@Refer]="SatyaP, Pahari",[@Refer]="Shalini, BBPS",[@Refer]="Shaloo, Fbd",[@Refer]="Smita, BBPS",[@Refer]="Ushi, PBgh"),"DND",TRUE,"")

Please help
Thanks a lot
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
One option is
Excel Formula:
=IF(OR([@Refer]={"AKG","RPG","MGG","Ish, Sonepat","Nidhi, Khanna","Ankush, LxmNgr","BHMS","Billa, Jldr","Bittoo, Gzb","BVB","Chauhan, Asr","Didi","Reeta, Gzb","Ginni, Rhn","GurpreetS AmbVhr","Janu","Jappi, RjrGdn","Jitender, Jpr","JoginderS, PVhr","Jyoti, Takshila","Monga AshkVhr","Network 21","Nightingale, SFA","Pintoo, MwlNgr","PPrakash, GH13","Raju, NMkt","Rampal Chhatwal","SatyaP, Pahari","Shalini, BBPS","Shaloo, Fbd","Smita, BBPS","Ushi, PBgh"}),"DND","")
But with that amount of options, I would use a lookup table instead.
 
Upvote 0
Solution
Hi @Fluff

I initially tried this way only. But for some reasons it gave spill error.

I think I shall try LOOKUP as you suggested. It gives me more flexibility that I am looking for.

Thanks again
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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