Thread: IF Statement
View Single Post
 
Old 11-14-2021, 04:30 PM
joeu2004 joeu2004 is offline Windows 7 32bit Office 2007
Advanced Beginner
 
Join Date: Aug 2016
Posts: 32
joeu2004 is on a distinguished road
Default

I would write:

=IF(OR(A2={"Night","Night (B)"}), B2+1, B2)


Alternatives:


=IF(OR(A2="Night",A2="Night (B)"), B2+1, B2)
or
=IF(LEFT(A2,5)="Night", B2+1, B2)


Caveat: The last formula chooses B2+1 when A2 is __any__ string that begins with "Night". For example, "Night (C)". Do not use it unless you want that flexibility.
Reply With Quote