+ Reply to Thread
Results 1 to 5 of 5

If Then Elseif statment

  1. #1
    Forum Contributor
    Join Date
    09-30-2010
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010
    Posts
    109

    Question If Then Elseif statment

    I am trying to wright this code but i keep getting error's what am I doing wrong?
    I am trying to put this in a long open workbook macro
    It tells me that the error is at the elseif, so I change it to else and the text turns red.

    Please Login or Register  to view this content.
    Last edited by CityMPLSEmpolyee; 03-18-2014 at 02:52 PM. Reason: I forgot code tags

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: If Then Elseif statment

    Hi, CityMPLSEmpolyee,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    09-30-2010
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: If Then Elseif statment

    sorry I could not remember how to do that.
    I throught it was the <>

    Please Login or Register  to view this content.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: If Then Elseif statment

    Hi, CityMPLSEmpolyee,

    that could have been HTML formattings like pre

    If you follow a command behinmd a Then that ends the structure of If...Else...End IF
    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Forum Contributor
    Join Date
    09-30-2010
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: If Then Elseif statment

    Thank very much.
    I appreciate this web sit allot

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Condensing IF, ElseIF, Else statment with multiple criteria.
    By beenbee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2014, 10:44 AM
  2. Code stepping in to elseif statement when elseif is definitely not true
    By DFrank231 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-13-2013, 05:31 PM
  3. Replies: 2
    Last Post: 06-06-2012, 10:59 PM
  4. If Elseif elseif problem
    By tjbillund in forum Excel General
    Replies: 3
    Last Post: 08-10-2011, 07:02 AM
  5. [SOLVED] IF statment within IF statment?
    By DaZombie in forum Excel General
    Replies: 2
    Last Post: 10-27-2010, 12:33 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1