+ Reply to Thread
Results 1 to 2 of 2

Trigger copy on AfterUpdate event

  1. #1
    Snowsride
    Guest

    Trigger copy on AfterUpdate event

    I have a spreadsheet with data in columns A - J. Column D contains a listbox
    with a Yes/No selection.

    If a cell in column D value is 'No' I want to copy the data from cell A of
    the same row to Sheet 2 column B. As the user moves down the data then each
    selection from the corresponding cell in column D should trigger the event
    and the data in A of that row should be copied to Sheet 2 column B.

    Help appreciated.

  2. #2
    Tim Barlow
    Guest

    Re: Trigger copy on AfterUpdate event

    Try this placed on the sheet's module:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim previousRow As Long

    previousRow = Target.Row - 1
    If previousRow >= 1 Then
    If UCase(Cells(previousRow, "D")) = "NO" Then
    Worksheets("Sheet2").Cells(previousRow, "A") =
    Cells(previousRow, "B")
    End If
    End If
    End Sub

    HTH

    Tim


    "Snowsride" <[email protected]> wrote in message
    news:[email protected]...
    > I have a spreadsheet with data in columns A - J. Column D contains a

    listbox
    > with a Yes/No selection.
    >
    > If a cell in column D value is 'No' I want to copy the data from cell A of
    > the same row to Sheet 2 column B. As the user moves down the data then

    each
    > selection from the corresponding cell in column D should trigger the event
    > and the data in A of that row should be copied to Sheet 2 column B.
    >
    > Help appreciated.




+ Reply to Thread

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