+ Reply to Thread
Results 1 to 3 of 3

Not exiting For loop

  1. #1
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208

    Not exiting For loop

    I have a For loop that depends on the number of cells that have a numerical value.

    I can step through the code and verify that it's not exiting the For loop when the cell value is "Empty". Can anyone help? Thanks.

    Here's the block of code that appears to be giving me trouble.

    Please Login or Register  to view this content.
    Thanks,

    -gshock
    Last edited by gshock; 11-13-2008 at 03:51 PM.

  2. #2
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270
    Please Login or Register  to view this content.
    This if statement checks if the value is a number and if its not empty. If it is empty, it stops the for loop. Then it inserts it into your range. Which is current fixed at C14, You do realize the for statement will cause C14, to overwrite each value that is numeric and not empty.
    Last edited by slx; 11-13-2008 at 03:45 PM.

  3. #3
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208
    Hey slx,
    Just after I posted, I kept tinkering with it and got it to work. I took out the "IsNumeric".

    Here's the code that worked for me:
    Please Login or Register  to view this content.
    Works like a charm. I never would have guessed it would be that simple.

    Thanks for your help.

    -gshock

+ 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