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

nested elseif statements

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Nested 'ElseIf' statements

Nested 'ElseIf' statements

ResolvedVersion 2003

Graeme has attended:
Excel VBA Intro Intermediate course

Nested 'ElseIf' statements

Can you please advise if there is a limit to the number of 'ElseIf' statements you can nest into a single 'If' > 'End If'?

RE: Nested 'ElseIf' statements

Hi Graeme

Thanks for your question

In principle there is no limit to the number of ELSEif in an if block. I would however recommend using a Select Case block for checking a large number of multiple conditions, as this is easier to maintain and understand

Regards

Stephen

 

Training courses

Training information:

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:

Separate the year from a date

To separate the year from a date use the =year() function, eg a date is in cell A1 and in A2 you wish to display the year enter the function =year(A1)

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.1 secs.