Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: What is the difference between Else and ElseIf?

  1. #1
    New Member
    Join Date
    Aug 2014
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default What is the difference between Else and ElseIf?

    What is the difference?

  2. #2
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    47,620
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    7 Thread(s)

    Default Re: What is the difference between Else and ElseIf?

    Short answer: use ELSEIF when you want to check another condition with multiple options that you want to handle differently. Use ELSE if you don't care about any other options and just want to return or do one thing if your main condition check is not met.

    Long answer: read this: VBA IF Function – Using IF, ELSE:, ELSEIF, IF THEN in VBA code | Excel & VBA – Databison
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •