+ Reply to Thread
Results 1 to 15 of 15

Copy row from one sheet and paste to another if a key word is found in 1 column of sheet 1

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Copy row from one sheet and paste to another if a key word is found in 1 column of sheet 1

    Hi everyone, my first post.
    I have 10 worksheets in my workbook. The two that I'm concerned with in this post are "Main" and "Completed".
    If Column AA in "Main" contains the word "Complete" (which is from a drop down list) I want to copy the entire row from "Main" and paste in the "Complete" sheet without over-writting previous pasted rows.
    Back in sheet "Main" I want the data in that row to be cleared with the exception of Column A as it contains a formula for sorting blanks. If I delete that row it will mess up my links on other sheets.
    Anyone?

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Hello killdozer,

    Welcome to the Forum.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    attach please a sample file with also desired result
    If solved remember to mark Thread as solved

  4. #4
    Registered User
    Join Date
    04-15-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Ok in the attached file it has four sheets, Main(Before),Completed(Before), Main(After), Completed(After)
    On Main(Before) rows, 3 and 8 have been marked "Complete" in Column AA
    On Complete(After)these two rows are now pasted in rows 2 & 3. (upon running a working macro)
    Now on Main(After)rows 3 & 8 data is empty except column A which value has changed from a 2 to a 1. When I sort any blanks rows (value 1) will go to the bottom. Column A is normally hidden.

    Here is the code that I have so far:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-15-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Thanks patel45, can it be changed so when the data from the Complete Sheet is cut, the info in Col A of the complete sheet stays?

    Killdozer

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Sorry, I did not understand

  8. #8
    Registered User
    Join Date
    04-15-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    What I mean is right now the data in the row with the key word "Complete" from the Main sheet is cut and pasted to the completed sheet. Instead of cutting the whole row can only the range B:AG be cut after the range A:AG is copied to the Complete Sheet?

  9. #9
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    04-15-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Excellent, does exactly what I want.
    Thanks a bunch patel45
    Problem Solved.

    Killdozer

  11. #11
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Hello killdozer,

    In your first post, you mentioned this requirement as well;

    Back in sheet "Main" I want the data in that row to be cleared with the exception of Column A as it contains a formula for sorting blanks.
    As the code is at the moment, your formula in Column A is compromised.

    By changing patel45's Code slightly, we can solve that for you as well, as shown below:

    Please Login or Register  to view this content.
    @ patel45,

    Hope you don't mind.

    Regards.
    Last edited by Winon; 04-17-2014 at 02:10 AM.

  12. #12
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    no problem, I did not notice the formula

  13. #13
    Registered User
    Join Date
    04-15-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Thanks Winon, now my sort still works.

    Graderbelly
    Solved

  14. #14
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Hello killdozer,

    Thank you for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, I would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which you have been helped. This adds to the reputation of the person who has taken the time to help you.


    Thanks.

  15. #15
    Registered User
    Join Date
    04-15-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Copy row from one sheet and paste to another if a key word is found in 1 column of she

    Done thanks again

+ 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. Replies: 2
    Last Post: 01-22-2014, 05:36 PM
  2. Lookup Value from Sheet 4 in Sheet 2, if found copy Sheet 2 Active Row to Sheet 5
    By lgosso23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2013, 02:51 PM
  3. Replies: 16
    Last Post: 01-20-2013, 09:40 AM
  4. [SOLVED] search column for text, if found, paste value in a different column in new sheet
    By wkarnadi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-17-2012, 10:29 AM
  5. Copy/Paste row to another sheet based on word in column
    By mulcahcf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2010, 12:55 PM

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