Results 1 to 5 of 5

How do I make values in a cell in one worksheet move to another worksheet

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-16-2013
    Location
    Florida
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    132

    How do I make values in a cell in one worksheet move to another worksheet

    Hello Arlu,

    You helped me sometime back. I'm trying to replicate what you showed me in a new workbook but can not get it to perform as before.

    I'm trying to move specific cell to another sheet if the cell has a value.

    I will attach the workbook

    I need to have rows moved to Task Summary sheet if column B has a value and need only Column A,B,C,H,M and only applies to rows B24:B40

    Here is the code I tried to do copying what you had done before
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim lastrow As Long
    
    If Not Intersect(Target, Range("B24:B40")) Is Nothing Then
        If Range("B" & Target.Row).Value <> "0" And Range("B" & Target.Row).Value <> "" Then
            lastrow = Worksheets("Task Summary").Range("A" & Rows.Count).End(xlUp).Row
            Range("A" & Target.Row & ":B" & Target.Row).Copy
            Worksheets("Task Summary").Range("A" & lastrow + 1).PasteSpecial (xlPasteValues)
            Range("C" & Target.Row & ":C" & Target.Row).Copy
            Worksheets("Task Summary").Range("C" & lastrow + 1).PasteSpecial (xlPasteValues)
            Range("H" & Target.Row & ":H" & Target.Row).Copy
            Worksheets("Task Summary").Range("D" & lastrow + 1).PasteSpecial (xlPasteValues)
        End If
    End If
    End Sub

    Here is code you had made for me that I used to get the above code
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim lastrow As Long
    
    If Not Intersect(Target, Range("C90:C403")) Is Nothing Then
        If Range("C" & Target.Row).Value <> "0" And Range("C" & Target.Row).Value <> "" Then
            lastrow = Worksheets("Task Summary").Range("A" & Rows.Count).End(xlUp).Row
            Range("A" & Target.Row & ":C" & Target.Row).Copy
            Worksheets("Task Summary").Range("A" & lastrow + 1).PasteSpecial (xlPasteValues)
            Range("E" & Target.Row & ":E" & Target.Row).Copy
            Worksheets("Task Summary").Range("D" & lastrow + 1).PasteSpecial (xlPasteValues)
            Range("G" & Target.Row & ":G" & Target.Row).Copy
            Worksheets("Task Summary").Range("E" & lastrow + 1).PasteSpecial (xlPasteValues)
            Range("I" & Target.Row & ":I" & Target.Row).Copy
            Worksheets("Task Summary").Range("F" & lastrow + 1).PasteSpecial (xlPasteValues)
        End If
    End If
    End Sub

    When I paste code into into editor as is nothing happens

    ThanksExample MBBW.xlsx
    Last edited by icevinson; 07-11-2013 at 12:18 PM.

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