+ Reply to Thread
Results 1 to 4 of 4

Nested IF's and Do Until Blocks

  1. #1
    Registered User
    Join Date
    03-21-2012
    Location
    california
    MS-Off Ver
    excel 2007
    Posts
    9

    Nested IF's and Do Until Blocks

    I dont know why i cannot put the 'end if' and 'loop' at the end of my code?
    In my code I am refrencing two different sheets while looping through one to find a range(cells c+1,"H") then copying that range and transferring it to the other page where it finds the corresponding refrence(styval) inorder to place it into the cells offset(0,3) from styval.

    the error that i keep getting is " end if without block if"

    I understand that there could be a more correct algorithm to my code and if you have sugguestions i'm very open to changing it, but any insight to how if blocks and do whiles correspond could be very helpful too.

    thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Nested IF's and Do Until Blocks

    I moved the End If's to after the Loops:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    03-21-2012
    Location
    california
    MS-Off Ver
    excel 2007
    Posts
    9

    Re: Nested IF's and Do Until Blocks

    Thank you for the quick correct, I thought that I had tried that.

    Thanks again!

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Nested IF's and Do Until Blocks

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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