+ Reply to Thread
Results 1 to 6 of 6

Run multiple if statements

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    NE
    MS-Off Ver
    2013
    Posts
    42

    Run multiple if statements

    What I am trying to do is run the code below for the same worksheet.

    The problem is Excel will only allow me to run one or the other.

    I want them to work at the same time.


    Please Login or Register  to view this content.
    Any help is greatly appreciated

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941

    Re: Run multiple if statements

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Run multiple if statements

    Hi,

    Firstly, could you please indent your code in the future, it makes it a lot easier to read. Secondly, just remove the Exit Sub statements, and reverse the polarity of the If...Then statements, like this:
    Please Login or Register  to view this content.
    Please note, I haven't tested this, I have done it off the top of my head. So please let me know if it still doesn't do what you're looking for and I'll take another look at it.

    I hope this helps

  4. #4
    Registered User
    Join Date
    08-21-2013
    Location
    NE
    MS-Off Ver
    2013
    Posts
    42

    Re: Run multiple if statements

    Thank you protonleah. That worked perfectly.

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    NE
    MS-Off Ver
    2013
    Posts
    42

    Re: Run multiple if statements

    Thank you very much. This worked perfectly.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Run multiple if statements

    Please don't forget to mark this thread as solved

+ 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. Formula with multiple IF statements and IF AND statements
    By lottidotti in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-14-2013, 08:03 AM
  2. Replies: 3
    Last Post: 07-25-2013, 08:25 AM
  3. [SOLVED] Syntax for formula that uses multiple conditions inside of multiple IF statements
    By njmiller31 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2013, 11:55 AM
  4. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  5. Replies: 12
    Last Post: 05-15-2009, 08:38 AM

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