+ Reply to Thread
Results 1 to 9 of 9

Vlookup contained within VBA code.

  1. #1
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    888

    Vlookup contained within VBA code.

    Hello happy campers,

    I have the following code
    Please Login or Register  to view this content.
    When i run the code i have a 'Run-time error '424: Object required'
    Highlighting the following line in yellow
    Please Login or Register  to view this content.
    Could someone pelase let me know what im doing wrong?

    kind regards, galvinpaddy

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Vlookup contained within VBA code.

    Post a sample workbook.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    888

    Re: Vlookup contained within VBA code.

    Hello,

    Thanks, workbook attached, took longer as had to remove personal details.

    In the VBA screen i have added the info to show where i wanted the vlookup, but by all means please correct me

    Regads, galvinpaddy
    Attached Files Attached Files

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Vlookup contained within VBA code.

    What are you trying to lookup? And I want to clean the rest of you code up, so what are you trying to achieve?

  5. #5
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    888

    Re: Vlookup contained within VBA code.

    The range is N:O on sheet 2, and by all means, if you can clean up my code it would be great!! would be good to learn how to clean it up.
    thanks

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Vlookup contained within VBA code.

    What are you trying to do. The code does nothing at present. And what are you trying to lookup?

  7. #7
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    888

    Re: Vlookup contained within VBA code.

    Hi,
    Without the vlookup part in the code, it works fine,
    Sheet2 - contains the numbers 1-4(column N) and the type of absence (column O).
    On sheet 2 after the original codes pastes the values, i then want the code to lookup the value in column E and return the value matching that into Column F.
    regard.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Vlookup contained within VBA code.

    Please refer to your other thread.

    Also refer to the forum rules with regard to duplicate threads. There is nothing more annoying than wasting time on a thread that has been resolved elsewhere.

  9. #9
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    888

    Re: Vlookup contained within VBA code.

    hi, apologies, i did not intend to duplicate posts.
    as you were good enough to help i didnt exactly want to say "instead of doing that here, please go there", although you are correct with your statement.

    I appreciate the help from all so far.

+ 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