+ Reply to Thread
Results 1 to 3 of 3

Loop Until Issues

  1. #1
    Registered User
    Join Date
    04-28-2006
    Posts
    16

    Loop Until Issues

    I'm trying to use Loop until to find a cell containing a particular word and then use an offset function. However, sometimes when I am looking for the word it may not actually exist. I was wondering if there was any form of "Loop Until Or" statement I could use to specifiy that if the cell didn't contain the word I was looking for, but instead was blank I could continue the macro

    The code I'm using is below. (I've Dimmed RiskCurrency as a string elsewhere) If I don't find RiskCurrency but I find a blank cell I'd like to continue.




    Please Login or Register  to view this content.
    Apologies if this is really straight forward.

    Thanks for any help in advance

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,803
    OR is a keyword in VBA. I've used it to good effect in an UNTIL statement. Something like
    Until (variablea=conditiona) Or (variableb=conditionb)

    The parantheses aren't necessary, but I like to use them to help me see the two separate conditions.

  3. #3
    Registered User
    Join Date
    04-28-2006
    Posts
    16
    Many thanks - that works perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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