+ Reply to Thread
Results 1 to 3 of 3

Looping a VBA code but missing a number

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Looping a VBA code but missing a number

    I'm trying to loop the following code

    Please Login or Register  to view this content.
    What I actually want it to do is loop 2 to 8 and 10 and 11 so to miss out 9. Can anyone help

    Thanks in advance

    John

  2. #2
    Registered User
    Join Date
    10-02-2014
    Location
    Munich, Germany
    MS-Off Ver
    2013
    Posts
    13

    Re: Looping a VBA code but missing a number

    Here you go:
    Please Login or Register  to view this content.
    For explanation: I just added an If statement around your code within the iTemp loop that prevents your loop code from being executed in case of the iTemp variable being 9.
    Last edited by ChrisVBA; 10-24-2014 at 07:55 AM. Reason: add explanation

  3. #3
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Re: Looping a VBA code but missing a number

    thanks a lot

+ 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. Code Help Looping N number of lines
    By carlfbassett in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2014, 07:24 PM
  2. [SOLVED] Find missing number and copy only missing number to another coloumn
    By vijaynadiad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2013, 02:01 PM
  3. [Solved] Looping Thru Worksheets. What am I missing?
    By bernice620 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-05-2012, 08:55 AM
  4. [SOLVED] Vb code To Find the missing triplets and complete the number series..?
    By sem in forum Excel Programming / VBA / Macros
    Replies: 43
    Last Post: 05-31-2012, 02:48 PM
  5. Code to Return Missing Number In Range
    By radar_jynx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2011, 10:56 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