+ Reply to Thread
Results 1 to 28 of 28

[How-to] ask marco to find, cut, paste entire row to new sheet if matched?

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    i need pro here to guide me along

    this got this code frm other site. It cut Entire row to new sheet but this code is gd if i dont have much data to cut and paste.


    What i want is,
    is it possible to Match P/N in (match.xls) with (Masterdata.xls) P/N column and cut the entire row in (Masterdata.xls) to another new excel?

    *SEE ATTACH for the 2 excel

    Match.xls
    Masterdata.xls
    ----------------------------------------

    i got this code somewhere but need to edit as it dont allow me to do what i want
    Please Login or Register  to view this content.
    Last edited by hark; 10-24-2012 at 02:45 AM.

  2. #2
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    can some1 help?

  3. #3
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    I'll upload your files back and tell me if this is what you wanted
    Back in 10min

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    Here you go.
    Have bouth workbooks open.
    You'll see that under P/N I added a number just to show you what happens if there is no match found in the MasterData.xlsx

  5. #5
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    Hi
    Yes, thanks
    that is what i want but can it CUT the entire row from MasterData.xlsx and PASTE into a new excel book? instead copy and paste?

  6. #6
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    Switch this part of the code:
    Please Login or Register  to view this content.
    With this code:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    deled..................
    Last edited by hark; 10-19-2012 at 02:36 AM.

  8. #8
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    i think i should set a header better right?

    E.g
    As long is header P/N (can be any column) the number matched in Masterdata.xls (same header P/N)

    Match.xlm will CUT AND PASTE from Masterdata.xls
    Last edited by hark; 10-19-2012 at 02:35 AM.

  9. #9
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    Did you switch the code?

    What header do you want to change? The title of the thread?

  10. #10
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    Hi
    I did not switch the code but the data in masterdata.xls could be longer. (i may need to add more column e.g name.. tel.... ++) in that case P/N may not fall under A2.
    but the header in the excel will remain the same.. (i mean P/N)

  11. #11
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    something like this....
    Can be as long as this....


    del file
    sorry sorry for the trouble.. thx thx
    Attached Files Attached Files
    Last edited by hark; 10-19-2012 at 09:11 AM.

  12. #12
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [HELP] How can ask marco to cut Entire row to new sheet if cell data matched ?

    maybe i should explain again
    the one i attach above masterlist.xls come with header..

    those on row1 is header (with diff name column so you can input detail data below according)
    if possible i will want the Marco to find those number under (column P/N in match.xls) and cut the entire row in (masterdata.xls) which matched the number in (column P/N in match.xls) to another new excel

    the reason y i wanted to use the header (e.g P/N) because i may add more column, in that case P/N may not longer under A2 column and i think having a header could be easy for coding?

    can macro coding set according to header rather than column?


    hope you understand what i mean. :D



    Revised xls
    thanks again.
    Last edited by hark; 10-19-2012 at 09:12 AM.

  13. #13
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    I'll take a look at it.
    Get back to you on Monday

  14. #14
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    if P/N had error for coding..

    i think set it to Product_No

    will it be better?

    as i understand some symbol is not allow for coding.. but i am no pro on this :P

    still learning
    Last edited by hark; 10-19-2012 at 09:18 AM.

  15. #15
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    HEHEH anyone can help?

  16. #16
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    bump for help )))))

  17. #17
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    I've made it so it searches the P/N and then matches the values and clears them.
    Try it out.

    Sory for the late answer - I got a new computer here at work yesterday so I had to install some stuff on

  18. #18
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    Thanks, i tried
    but if i insert a NEW column in front of P/N
    it dont copy that column that in front of it

    Quote Originally Posted by stojko89 View Post
    I've made it so it searches the P/N and then matches the values and clears them.
    Try it out.

    Sory for the late answer - I got a new computer here at work yesterday so I had to install some stuff on

  19. #19
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913
    I'll give you the answer in the morning. You have to be more specific of what you want/need.

  20. #20
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    thanks but i did mention i may add more extra column ...... maybe i should say i maybe can be front or back column.. sorry

    Quote Originally Posted by stojko89 View Post
    I'll give you the answer in the morning. You have to be more specific of what you want/need.
    Last edited by hark; 10-23-2012 at 11:41 PM.

  21. #21
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    hark Hi again...
    Maby this will sound silly for to you but...why don't you keep P/N Column as Column A ?
    It's easier to copy stuff.

    Sure I'll change the code so it finds the column and so on but it would be more logical to have the Code P/N number in column A and you add columns to the right side of the P/N number.
    But as you wish...

  22. #22
    Registered User
    Join Date
    10-23-2012
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    Hello,

    I have posted a similar problem, dont want to hijack this thread but can I point you to that thread, stojko89, if you can help please?
    http://www.excelforum.com/excel-prog...worksheet.html

    Please feel free to delete this post if it violates the forum rules, Sorry !

  23. #23
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    Workbooks back.


    Hope this is it
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    Hi as P/N is a product code rather than a serial number that is why i did not put in column A.
    if that is a issue maybe i had to use excel function to clone the p/n from that column and put in column a in order for macro to works.

    Quote Originally Posted by stojko89 View Post
    hark Hi again...
    Maby this will sound silly for to you but...why don't you keep P/N Column as Column A ?
    It's easier to copy stuff.

    Sure I'll change the code so it finds the column and so on but it would be more logical to have the Code P/N number in column A and you add columns to the right side of the P/N number.
    But as you wish...

  25. #25
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    YES!!! this is the one i want thanks!!! it work great!!!

    Quote Originally Posted by stojko89 View Post
    Workbooks back.


    Hope this is it

  26. #26
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    Thank god! we made it hahah
    Just have in mind that your headers in MasterData and Match have to be in the same place, else your data won't be under the right header.

    Else, good luck!

  27. #27
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    Ya Thank You very much...

  28. #28
    Registered User
    Join Date
    10-18-2012
    Location
    sg
    MS-Off Ver
    Excel 2013
    Posts
    25

    Re: [How-to] ask marco to find, cut, paste entire row to new sheet if matched?

    Hi can i know how to change copy to cut?

+ 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