+ Reply to Thread
Results 1 to 1 of 1

Automatically move rows of data to different worksheets based on cell criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    Northamptonshire
    MS-Off Ver
    Excel 2010
    Posts
    54

    Unhappy Automatically move rows of data to different worksheets based on cell criteria

    Hi, can someone help me to modify the coding below that currently works if column F target equals "Contracts signed & received" which automatically transfers the row of data from the tab "ongoing" to tab "New Clients". Now I need to add another condition whereby if the target in column F is equal to "Business Lost" this row of data is automatically moved to tab "Lost Business". I have attached an example workbook.
    Thanks

    Option Explicit
    Dim Flag As Boolean
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim LR As Long
    LR = Range("A" & Rows.Count).End(xlUp).Row

    If Flag = True Then Exit Sub
    If Not Intersect(Target, Range("F3:F" & LR)) Is Nothing Then
    If Target.Value = "Contract signed & received" Or Target.Value = "On Hold" Then

    LR = Sheets("New Clients").Range("A" & Rows.Count).End(xlUp).Row + 1
    Target.EntireRow.Copy
    Sheets("New Clients").Range("A" & LR).PasteSpecial
    Flag = True
    Target.EntireRow.Delete
    End If
    End If
    Application.CutCopyMode = False
    Flag = False
    End Sub
    Attached Files Attached Files

+ 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