+ Reply to Thread
Results 1 to 5 of 5

Search & retrieve data between sheets

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Search & retrieve data between sheets

    In my worksheet, I have 2 sheets that I'm working with, "Daten" and "Highlights (2)", and I want to search for a list of part #s on "Highlights (2)" in "Daten" that has part #s and data that corresponds to those #s. The part #s in "Daten" have several copies of each part #. The part #s in "Highlights (2)" are in column "A" and start on the 2nd row. The part #s in "Daten" are in column "B" and start on the 2nd row. Once the part # is found in "Daten", I want to copy the contents in column "D" in the same row over to "Highlights (2)" corresponding part #s row in column "E". The number of part #s change on a week to week basis. I've gathered code from several sites because of my basic understanding of VBA, and tried to piece it together as best as possible. I'm getting several errors that involve the Range function esp. Error 1004.

    Here is the code I've put together:

    Please Login or Register  to view this content.
    Last edited by arlu1201; 08-17-2012 at 02:27 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Search & retrieve data between sheets

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Search & retrieve data between sheets

    brisser90,

    Welcome to the forum!
    Give this code a try:
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 08-17-2012 at 03:13 PM. Reason: Added comments to code
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Search & retrieve data between sheets

    Tigeravatar,

    Your code works, thanks! If you have the time could you put descriptions in for some of the code so I know what the code is actually doing so I can learn what you did?

    arlu1201,

    Sorry about the code tag, thanks for fixing that. I'll make sure to do that in the future.

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Search & retrieve data between sheets

    brisser90,

    I have updated my first post to include comments in the code. I hope that helps.

+ 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