Results 1 to 2 of 2

Copying Data from Master and Creating new worksheet to save data

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Exclamation Copying Data from Master and Creating new worksheet to save data

    Good afternoon Forum Users and Gurus!!!

    I am trying to work on creating a macro that will copy the entire row of data and then paste to the appropriate worksheet. I am currently working with creating the code to create the worksheets but I want to be able to copy the row data based on the Item Number(column C). There are some items that I want to copy to a different worksheet based on their classification (column AE).

    Ex. I have an Item Number 8602800-501 which I want to save to a worksheet named, Kronos. I then have specific items that get copied to worksheets based on there classification and not the item number, such as B-452-TC12-QQ-CHD is a printer and the classification shows "Printer" and I would want to copy and then paste to the Printer Worksheet.

    I have attached a workbook that has the master data I want to copy from.

    I have come across the following code...

    Sub ItemSeparate()
    
    
    Dim lngLastRow As Long
    lngLastRow = Sheets("Master Report Data").Range("AI2").End(xlDown).Row
    For Each C In Sheets("Master Report Data").Range("AI2:AI" & lngLastRow)
         C.EntireRow.Copy
         Select Case C
              Case Is = "Moto at Moto"
                   Sheets("Moto at Moto").Range("A2").End(xlDown).Offset(1, 0).PasteSpecial
              Case Is = "Moto at Stratix"
                   Sheets("NFF").Range("A2").End(xlDown).Offset(1, 0).PasteSpecial
               Case Is = "Printer"
                   Sheets("Printer").Range("A2").End(xlDown).Offset(1, 0).PasteSpecial
         End Select
    Next C
    
    
    End Sub
    Which I think is a start but when I run this code, nothing gets pasted to the sheets.

    Thanks!!!!
    Attached Files Attached Files

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