+ Reply to Thread
Results 1 to 9 of 9

Find copy and paste

  1. #1
    Forum Contributor
    Join Date
    12-23-2007
    Location
    chennai india
    MS-Off Ver
    2010
    Posts
    141

    Find copy and paste

    In my earlier query I was not able to explain properly in haste. Select accountname(memory variable) from output sheet A column search in inputsheet column A copy row C to G and paste in output sheet E to I. If accountname is not in input sheet Output sheet row E to I will be blank. Accountname in outputsheet has more rows than inputsheet , extra rows will be blank. Accountname in outputsheet has less rows than inputsheet , than less rows will be copied in outputsheet. Attach spreadsheet , worksheet named correct shows the result I want. If code is written in different way no problem. Thanks in advance for solving the issue.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Find copy and paste

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    12-23-2007
    Location
    chennai india
    MS-Off Ver
    2010
    Posts
    141

    Re: Find copy and paste

    Thanks Ben for your reply. Small corrections are to be made. In output sheet A column "M/S C" has only two rows but three rows has been pasted."M/S B" is not in outputsheet A column but the details of it has been pasted. "M/S D" starts from 13 th row (column A)in output but from 15th row the details has been pasted. It was Late night so i could not respond immediately now it is early morning.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Find copy and paste

    I'll check tomorrow, it's late here now

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Find copy and paste

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-23-2007
    Location
    chennai india
    MS-Off Ver
    2010
    Posts
    141

    Re: Find copy and paste

    Hi Prontech,
    Appreciate and value for your efforts for the above code and thanks for the same. The code is running correct for the first time and in second time it shows error 1004 and in input sheet C2 is replaced from "M/S A" to "7". The last line is not pasted may be because first two colums are blank. If I replace blank column by "." will it work?

    Regards

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Find copy and paste

    I don't understand what you mean by running it a second time. error 1004 indicates that a name was not found. Are you saying that your second sheet is named "C2" and not input? Post the workbook that gives the error.

  8. #8
    Forum Contributor
    Join Date
    12-23-2007
    Location
    chennai india
    MS-Off Ver
    2010
    Posts
    141

    Re: Find copy and paste

    Attach picture where error occurs. error occurs when i start running the code from input sheet. in inputsheet c2:c5 is replaced by 7 and run time error 1004 is displayed.
    when i run the code from output sheet it works fine except in output column in c9 it pates "M/S B" which it should not. Regret for delay in reply.
    Attached Images Attached Images

  9. #9
    Forum Contributor
    Join Date
    12-23-2007
    Location
    chennai india
    MS-Off Ver
    2010
    Posts
    141

    Re: Find copy and paste

    my proble has been solved. Code should be started from output page and other minor correction can be done mannually.

+ 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] Find text Copy Paste to new tab
    By Tortus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2016, 02:10 PM
  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. [SOLVED] Macro to Find, copy, paste, find, copy, paste, find, copy, paste, u get the picture....
    By westsoldman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-12-2012, 01:12 AM
  4. Copy\Find\Copy\Paste Multiple Workbooks
    By JMcClane in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-05-2010, 10:23 AM
  5. find, copy, paste
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-28-2010, 04:39 PM
  6. code to find, copy and paste until find new, then repeat
    By siddharthariver in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2010, 04:02 PM
  7. Find, Copy, Paste to new row
    By Adaliza in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2006, 07:55 PM

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