View Single Post
 
Old 07-27-2022, 07:49 AM
Marcia's Avatar
Marcia Marcia is offline Windows 10 Office 2019
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default Alternative to repetitive OR in formula

Hi. The code,
=IF(OR(LEFT($B$4,4)<>1016,LEFT($B$4,4)<>1021,LEFT( $B$4,4)<>1022),"A","B")
returns the correct value. Is there a shorter formula that does away with the repetitive LEFT and gives the right answer?
I tried
=IF(LEFT($B$4,4),"<>"&OR{1016,1021,1022},"A","B")
but it returns an error message.
Thank you for all the help.
Reply With Quote