Results 1 to 4 of 4

Copying row of data to new sheets if specific value exists in column

Threaded View

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    5

    Copying row of data to new sheets if specific value exists in column

    Hello,
    I have this macro that was created for me already that works perfect for what I originally asked. I did edit it from the original code given to me to make it run when opening the workbook and also changed columns being used and sheets names. I thought I'd be able to figure out how to add to it but being extremely new to VBA codes, I was unable to :-(. I'm hoping someone can help me!

    Currently, the macro looks for the words "Not Sent" in column I and if it exists, copies that row to the "Not Sent" sheet in the workbook. I would also like it to search for:
    "Potential" in the same column and move to "Potential" sheet
    "Pending" and copy to "Pending" sheet
    "Project - T&M" or "Project - Contract" and copy to "Projects" sheet
    or if a date is entered in that column, copy to the "Complete" sheet

    Here is the existing macro I am using:

    Private Sub Workbook_Open()
    
    r = 2
    r2 = 2
    While Cells(r, 1) <> ""
        If UCase(Cells(r, 9)) = "NOT SENT" Then
            For j = 1 To 12
                Sheets("Not Sent").Cells(r2, j) = Cells(r, j)
            Next j
            r2 = r2 + 1
        End If
    
        r = r + 1
    Wend
    
    End Sub
    Thank you!!!
    Last edited by JBeaucaire; 05-23-2013 at 05:31 PM. Reason: Added CODE tags, as per Forum Rules. Take a moment to read the Forum Rules in the menu bar above. Thanks.

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