Copy data from Cell

Posted on 2011-04-19
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

Question by:Cartillo
    LVL 30

    Expert Comment

    What do you want to do after copying the data?

    LVL 9

    Accepted Solution

    plz check the attachment

    Author Closing Comment

    Hi Ramanhp/Sid,

    Thanks a lot for the help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
    INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
    The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
    This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now