Copy Rows To Other Worksheets

  • Hello,


    I have a master spreadsheet that contains a lot of information about chemicals used in our business. Each is categorized with a number 1-5 in a column at the end, and the goal is to write a macro that will copy the rows to 5 separate worksheets based on this number while still retaining the data on the master sheet.


    I have very little experience writing any sort of code, so any help would be much appreciated!

  • Re: Copying Rows To Other Worksheets With Macros


    Hi Intern, If you do a search on this forum you'll find loads of stuff that will do this for you. Seach for "Copy Rows Macro".


    Ger

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: Copying Rows To Other Worksheets With Macros


    Hi


    try something like this


    Code
    Dim N As Integer
    Do Until ActiveCell = "" 'position cursor over appropriate cell 
    N = ActiveCell
    ActiveCell.EntireRow.Copy Destination:=Sheets(N).Range("A1")
    ActiveCell.Offset(1, 0).Select
    Loop


    which assumes that the sheets to which you are copying the data are named "1","2","3" etc


    HTH


    Robert

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!