We help IT Professionals succeed at work.

Copy data from Cell

Cartillo
Cartillo asked
on
242 Views
Last Modified: 2012-05-11
Hi Experts,

I would like to request Experts help  to add additional function in the attached script. Need to copy Column E data cell  as well automatically when column A being updated. Hope Experts will help me to add this additional feature. Attached the workbook for Experts perusal.



Sub UpdateValues(ByRef Target As Range)
Dim DateStr As String

    If Target.Column = 1 Then
        Target.Offset(1, 0).Select
    End If
    If Target.Row < 3 Then Exit Sub
    If Not Application.Intersect(Target, Columns(1)) Is Nothing Then
        If Target.Cells.Count = 1 Then
          Target.Offset(, 1) = Environ("username")
          Target.Offset(, 2) = Now()
          DateStr = Format(Target.Offset(, 2).Value, "dd-mmm")
          If Target.Row > 3 Then
            Target.Offset(, 3) = Target.Offset(-1, 3)
            If Target.Row > 21 Then
                If Target.Offset(-18, 3) = Target.Offset(, 3) Then
                   MsgBox "19 rows - change box number"
                End If
            End If
          End If
        End If
    End If
End Sub

Open in new window

UpdateData-1.xls
Comment
Watch Question

What do you want to do after copying the data?

Sid
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Hi Ramanhp/Sid,

Thanks a lot for the help
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.