Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PivotField AfterUpdate event? | Excel Programming | |||
Event Trigger | Excel Programming | |||
AfterUpdate Event not Running | Excel Programming | |||
trigger an EVENT when the value in a cell changes? | Excel Programming | |||
Trigger Event | Excel Programming |