+ Reply to Thread
Results 1 to 6 of 6

Find text in column A then copy the cell to the right and paste it in sheet2

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    3

    Find text in column A then copy the cell to the right and paste it in sheet2

    Hi,

    In column A on Sheet 1 I have some different measurepoints. Beside each one I have the value of the measurement. I need help to a macro that can find the first "P1" in column A and then copy the value from the cell in column B and paste it into column A on sheet 2. After that it have to find the next "P1" and then do the same thing. I can have up to 50000 of "P1".

    In the attach dokument you can see what result I'm looking for. I have showed it with the "P2".

    Thank in advance

    Alring
    Attached Files Attached Files
    Last edited by Alring; 08-22-2013 at 04:46 AM.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Find text in column A then copy the cell to the right and paste it in sheet2

    Try:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find text in column A then copy the cell to the right and paste it in sheet2

    Hi millz

    Thank you for the help. It works perfect.

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Find text in column A then copy the cell to the right and paste it in sheet2

    Hi Alring, yes it works fine in the test workbook, but I just spotted a mistake myself. This should fix it.

    add this:
    Please Login or Register  to view this content.
    above here:
    Please Login or Register  to view this content.
    so it looks like this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find text in column A then copy the cell to the right and paste it in sheet2

    Hi millz

    It stills works perfect. I can't even see the different in the result with the change.

  6. #6
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Find text in column A then copy the cell to the right and paste it in sheet2

    If it's working fine, no worries. You can edit your thread and mark it as solved. Anyway, if 'rowsskipped = 0' line wasn't there, the macro will sort of fail if you have more than 100 blank rows inbetween your data.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy data from column A and B Sheet1 and paste into Sheet2
    By rabra in forum Excel General
    Replies: 2
    Last Post: 02-03-2013, 11:39 AM
  2. Vba - find next empty column, insert column, copy paste values & copy paste formulas
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 12:43 PM
  3. VBA to Copy single row, find match in sheet2 & paste over
    By pepe.r.taylor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2011, 10:06 AM
  4. Find text in column, copy next row and paste in new sheet
    By MikeTiplady in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2009, 04:26 PM
  5. find last non blank cell in a column and copy paste in next row
    By prasad_tavva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2007, 09:41 AM

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