I have a Programable logic controller that automatically puts data into the work sheet. I have it setup to move the data down to the next empty cell for columns A and B. When I add more colunns to the code the new data goes into columns A and B. I am wanting to use this as a trending workbook. Here is the code I am using. Thanks for the help!
I would like to have a dozen or more columns.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$6" Then
Application.EnableEvents = False
Range("B65536").End(xlUp).Offset(1, 0).Value = Target.Value
Application.EnableEvents = True
Else
End If
If Target.Address <> "$B$6" Then
Application.EnableEvents = False
Range("A65536").End(xlUp).Offset(1, 0).Value = Target.Value
Application.EnableEvents = True
Else
End If
End Sub
I would like to have a dozen or more columns.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$6" Then
Application.EnableEvents = False
Range("B65536").End(xlUp).Offset(1, 0).Value = Target.Value
Application.EnableEvents = True
Else
End If
If Target.Address <> "$B$6" Then
Application.EnableEvents = False
Range("A65536").End(xlUp).Offset(1, 0).Value = Target.Value
Application.EnableEvents = True
Else
End If
End Sub