+ Reply to Thread
Results 1 to 5 of 5

Compile Error

  1. #1
    Registered User
    Join Date
    02-19-2009
    Location
    Cambridgeshire, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Compile Error

    Dear All,

    After lots of help yesterday from RoyUK, I now have the following macro. However, this gives me a compile error Block if without End If but I do have an End If statement.

    Please Login or Register  to view this content.
    Any ideas?

    Thanks
    DB

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,607

    Re: Compile Error

    For each "If" in your code you need an "End If". Having one at the end will not suffice, alas.

  3. #3
    Registered User
    Join Date
    02-19-2009
    Location
    Cambridgeshire, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Compile Error

    Thank you!

    It would be something that simple!!

    my macro now works beautifully so thank you very much!

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Compile Error

    May want to note:
    Sometimes you will get a "NEXT with no FOR" error, when in fact it's an ENDIF that you're missing.

    mew!
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  5. #5
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Compile Error

    Dumb Blonde

    Your post does not comply with Rule 9 of our Forum RULES. If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit. And please never edit a thread in which someone else has responded.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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