+ Reply to Thread
Results 1 to 6 of 6

Find cell in Range and If found then copy to next sheet

  1. #1
    Registered User
    Join Date
    02-07-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Find cell in Range and If found then copy to next sheet

    Hello, I need a macro that will do the following:

    I have two sheets with data with many columns and rows, on the sheet1 in column B are listed serial numbers which I want to find in sheet2 (they are also listed in column B). When the serno will match, then copy entire row from sheet1 (for the specific serno.) to the place where the serno is placed in sheet2, but start pasting from column A.

    Hope I explained it clear, any suggestions ?

  2. #2
    Registered User
    Join Date
    02-07-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Find cell in Range and If found then copy to next sheet

    Well I was able to put the code together alone, because nobody has replied to my thread This is what I have so far, but I would like to insert a msgbox into code, so user can define the source and target range. Please can you help me with it ?

    Please Login or Register  to view this content.
    Last edited by arlu1201; 02-20-2013 at 04:57 AM.

  3. #3
    Forum Contributor
    Join Date
    01-25-2013
    Location
    near Philly, PA USA
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: Find cell in Range and If found then copy to next sheet

    try:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-07-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Find cell in Range and If found then copy to next sheet

    Thanks bob33 for your answer, I know how the msgbox code looks like but how to implement it to my code ? The code should look something like this:

    Please Login or Register  to view this content.
    Any ideas how to resolve it ? Thanks in advance!
    Last edited by arlu1201; 02-20-2013 at 04:58 AM.

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

    Re: Find cell in Range and If found then copy to next sheet

    Sachy,

    Welcome to the forum.

    I have added code tags to your posts. 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 below this post.
    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]

  6. #6
    Registered User
    Join Date
    02-07-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Find cell in Range and If found then copy to next sheet

    After reading some similar threads and also googling around (which takes pretty much time), I was able to put together a functional version of code, that does exactly what I want. So here it is, if anybody is dealing with same problem:
    Please Login or Register  to view this content.
    Last edited by Sachy; 03-20-2013 at 11:04 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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