+ Reply to Thread
Results 1 to 5 of 5

end if without block if HELP

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    end if without block if HELP

    Why am I getting a compile error:
    End if without block if on a simple freaking loop?


    Please Login or Register  to view this content.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: end if without block if HELP

    Either:
    - Delete the underscore after Then
    or
    - Delete 'End If'

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: end if without block if HELP

    Hi,

    Because you have a line continuation character '_' which means there is no block IF statement and hence no need for an End If. Either remove the _ or the End if
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: end if without block if HELP

    Quote Originally Posted by Olly View Post
    Either:
    - Delete the underscore after Then
    or
    - Delete 'End If'

    Please Login or Register  to view this content.
    How do you change this to find the last row instead of going to the 74th row

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: end if without block if HELP

    Maybe:

    Please Login or Register  to view this content.

+ 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. end if without block if
    By pandale in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2014, 07:48 PM
  2. New boy on the block
    By Firepoint in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 06-04-2014, 12:51 PM
  3. Replies: 5
    Last Post: 10-09-2012, 10:44 AM
  4. End if without If Block
    By cbh35711 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2012, 04:32 PM
  5. Replies: 2
    Last Post: 06-22-2010, 07:55 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