1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved What am I missing ??

Discussion in 'Software Development' started by snoozee, Dec 27, 2018.

  1. snoozee

    snoozee Thread Starter

    Joined:
    Apr 10, 2006
    Messages:
    263
    Hi

    I can't work out what's wrong with my code below :-(

    I think it might have something to do with the fact that the users data input doesn't start until row 16 as above this is a header row (row 15) and from row 1 -14 is a dashboard working off the data input.

    I'm trying to copy and paste the data input into columns A-C into a new worksheet if column U contains "Y".

    I've been playing with this for ages and can't work out how to fix it so any help would be greatly appreciated :)

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Column = 21 Then
    Application.ScreenUpdating = False
    If Target.Value = "Y" Then
    Sheets("Dec18").Range("A" & Target.Row & ":C" & Target.Row).Copy
    myRow = Sheets("ActiveCustomers").UsedRange.Row + 1
    Sheets("ActiveCustomers").Range("A" & myRow & ":C" & myRow).Select
    Sheets("ActiveCustomers").Paste
    Target.Select
    End If

    Application.ScreenUpdating = True
    End If
    End Sub
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Short URL to this thread: https://techguy.org/1221028

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice