+ Reply to Thread
Results 1 to 7 of 7

VBA compilation error : expected expression error

  1. #1
    Registered User
    Join Date
    07-20-2010
    Location
    us
    MS-Off Ver
    Excel 2003
    Posts
    8

    VBA compilation error : expected expression error

    Hi All,

    I have been working on VB and I am getting a compilation error in a particular code.

    I am trying to use Vlookup to get the data from an array which is in another worksheet, I am able to get the data using the below formula and it is working fine.

    Please Login or Register  to view this content.

    But, I am getting #N/A error, So I have been trying to use ISNA function in the VB, but it is showing the compilation error - Expected: expression. Please help.

    Please Login or Register  to view this content.
    And I am getting the error at the IF statement!!!
    Last edited by raknahs; 07-20-2010 at 11:44 PM. Reason: more info

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VBA compilation error : expected expression error

    You have a few choices really... the simplest perhaps being:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-20-2010
    Location
    us
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: VBA compilation error : expected expression error

    thanks a lot... I will check it update you tomorrow!!!

  4. #4
    Registered User
    Join Date
    07-20-2010
    Location
    us
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: VBA compilation error : expected expression error

    Hi, it is working.... But if the vlookup does not have any cells with NA. it is throwing an error
    run time error 1004
    No cells were found
    so, i cant use it...some lookups will have na and some might not have NA...so it is more complicated!!!

    Thanks for ur help and any suggestions on this problem to avoid the runtime error!!!

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA compilation error : expected expression error

    Simple addition:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VBA compilation error : expected expression error

    Apologies - oversight on my part.

  7. #7
    Registered User
    Join Date
    07-20-2010
    Location
    us
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: VBA compilation error : expected expression error

    Wow... its working.. thanks a lot...

    will let u know if i have any further comments. Thanks once again!!!

+ 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