+ Reply to Thread
Results 1 to 3 of 3

Do until with multiple conditions

  1. #1
    Registered User
    Join Date
    05-09-2010
    Location
    Belgrade,Serbia
    MS-Off Ver
    Excel 2013
    Posts
    33

    Do until with multiple conditions

    Hi,

    I'm new to VBA so sorry if this is too basic.
    I'm looking for an easier way to write multiple "and" operators
    after "Do until" statement. Since I have over 20 conditions, I would like
    to avoid writing them one by one.
    So, how do I replace:

    Please Login or Register  to view this content.
    with something less cumbersome.

  2. #2
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Canada Eh
    MS-Off Ver
    Excel 2010
    Posts
    199

    Re: Do until with multiple conditions

    Hi Stefan, in my experience, coding individual conditions can be a cumbersome ordeal and part of the reason why coding can get quite bloated. Coding is also very precise and while variables can be made to hold different values and etc., conditions are very rigid by nature.

    So what can you do? Most likely, you'll have to code each condition but without seeing what any conditions are, I can't help you. If you know all your conditions, and you should, provide 4 or 5 here so that someone can get you started.
    Click the * to give Rep to a post you like.

  3. #3
    Registered User
    Join Date
    05-09-2010
    Location
    Belgrade,Serbia
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Do until with multiple conditions

    Thanks for the advice Mad-Mizer.

    Here's the simplified version of my code:

    Please Login or Register  to view this content.
    There must be a way to get rid of these ANDs, right?
    Although the code is working, it is extremely slow (takes more than five minutes to execute).
    And I thought it might run slightly faster if I could deal with those conditions in a more efficient way.

+ 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. [SOLVED] Vlookup - Country conditions (Multiple conditions)
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2013, 11:42 AM
  2. Replies: 0
    Last Post: 08-14-2012, 01:18 PM
  3. Insert multiple values from seperate table based on multiple conditions
    By drakesong in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-28-2011, 06:04 PM
  4. Replies: 1
    Last Post: 12-05-2010, 04:39 AM
  5. How to multiple conditions to validate more than 2 conditions to .
    By Bhuvana Govind in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2005, 04:06 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