excel vba training - if or function

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

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

excel vba training - IF / OR function

resolvedResolved · Low Priority · Version 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:

How to Remove Duplication's from a selection of data in an Excel 2010 Worksheet

It would take far too much time to scan through rows and rows of data to find and remove duplicate data. So, here's how to do this using a much more efficient method:-

1) Select the data that might contain duplication's
2) Click the ''Data'' tab
3) Go to ''Data Tools'' and click ''Remove Duplicates''
4) A box will appear. Tick the boxes of the columns that you want to use to check for duplicates. Finally, click ''OK.''

View all Excel hints and tips


Server loaded in 0.1 secs.