Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

excel vba training - if or function

Forum home » Delegate support and help forum » Microsoft Excel Training and help » excel vba training - IF / OR function

excel vba training - IF / OR function

ResolvedVersion Standard

Nick has attended:
Access Introduction course

IF / OR function


I want a formula to return a certain response if any one of several questions is answered "YES" - can you please help ?

i.e. if cellA = "Yes", or if cellB = "Yes", or if cellC = "Yes" ....... return Y


I have searched microsoft help and can't find a solution

RE: IF / OR function

Hi Nick,

Yep, it works in the similar way to the AND() function I told you about in your previous post.

Simply swap the AND() for OR(), like this:

=IF(OR(B2="yes", C2="yes", D2="yes"), "y", "n")

The OR() will return your 'if true' value (in this case "y") if ANY of the conditions listed in OR() are true. Otherwise the IF() statement will return your 'if false' value (in this case "n").

Hope this answers your question.

Regards, Rich

 

Training courses

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Convert Text into Number

Some times numbers maybe imported in as text or you maybe concatenating numbers that form a text string that now are treated, because you had to extract them by Text functions

To convert Text into Number just encase the relevant cell reference or formula in the TEXT function. See Converting American Date to European hint

eg TEXT(Ref) or TEXT(formula)

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.