+ Reply to Thread
Results 1 to 5 of 5

1004 Error - Application or object defined error

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Office 2010
    Posts
    71

    1004 Error - Application or object defined error

    Hi

    I am trying to get VBA to enter a vlookup but I get a 1004 Run-time error, its the following piece of code that is causing the issue (there's another 7 or 8 rows similar to this afterwards, I then convert the formulas to values), I can't see anything wrong with it (New_EE_Id and WorkforceReport are defined as range and string).

    New_EE_Id.Offset(0, 1).Formula = "=vlookup(RC[-1]," & WorkforceReport & "!$C:$D,2,FALSE)" 'Name

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644
    Your formula mixes R1C1 and A1 notation, change it to use one or the other.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Office 2010
    Posts
    71

    Re: 1004 Error - Application or object defined error

    Quote Originally Posted by Norie View Post
    Your formula mixes R1C1 and A1 notation, change it to use one or the other.
    Thanks, how would I go about doing an absolute reference with R1C1 notation for two rows?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: 1004 Error - Application or object defined error

    2 columns no?
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Office 2010
    Posts
    71

    Re: 1004 Error - Application or object defined error

    Yeah, columns, sorry.

+ 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