+ Reply to Thread
Results 1 to 2 of 2

Copy or cut rows and paste in another sheet based on 3 scenarios

  1. #1
    Registered User
    Join Date
    07-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    24

    Copy or cut rows and paste in another sheet based on 3 scenarios

    Hi gurus

    I tried to find my vba requirement from google but could not find exact scenarios in any where. I am assuming my request comes under a sheet event change. The attached workbook already have sheet change macros in it.(I cant claim the credit)

    My dilemma is to find an exact answer for my below situation.

    I want to cut and paste selected cell range from sheet WiP to Back allocation form, in three different scenarios.

    1. If column N is “Completed” and Column AA is “Allocated to TL/Site”, then I need to copy (not cut) the entire row in to sheet named ”Back allocation form” without capturing the contents in column N,O and P
    2. If column N is NOT “Completed” and Column AA is “Allocated to TL/Site”, then I need to cut the entire row in to sheet named ”Back allocation form”
    3. If column N is “Completed”, column Q is “Completed” and Column X is “Allocated to TL/Site”, then I need to copy (not cut) the entire row in to sheet named ”Back allocation form” without capturing the contents in column N,O,P,Q,R and then U,V and W.
    I tried to find this info from google but could not find exact scenarios in any where
    Any suggestions please
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Copy or cut rows and paste in another sheet based on 3 scenarios

    I have a code for one of the scenario

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim r As Long
    If Target.Count > 1 Then Exit Sub

    If Not Intersect(Target, Range("AA6:AA" & Rows.Count)) Is Nothing And _
    Target = "Allocated to TL/Site" Then
    Application.EnableEvents = False
    r = Target.Row
    Rows(r).Copy Sheets("Back allocation form").Range("C" & Rows.Count).End(xlUp).Offset(1, 0)
    Application.EnableEvents = True
    End If
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 10-16-2017, 11:39 AM
  2. Copy rows based on cell value and paste on a new sheet
    By cowboy14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2017, 03:09 PM
  3. [SOLVED] Copy and paste rows to new sheet based on dropdown value
    By j.farr3ll in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-31-2014, 06:16 AM
  4. Macro to copy rows based on moving date and paste the rows into an identical sheet
    By ivandc1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2014, 11:59 AM
  5. Copy and Paste Rows based on Criteria onto another sheet and sort based on oldest item
    By Kushal8684 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 05:37 AM
  6. [SOLVED] Macro to copy and paste rows to a new sheet based on criteria
    By Belo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-31-2010, 02:25 AM
  7. Copy\Paste multiple criteria based rows to new sheet
    By namz in forum Excel Programming / VBA / Macros
    Replies: 46
    Last Post: 06-06-2008, 08:08 AM

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