macro to move from one worksheet to another at the same row

  • Thread starter Thread starter btb_London
  • Start date Start date
B

btb_London

To make data entry easier I wish to split questionnaire answers
accross several worksheets.

For example if I am entering the data from form 23 I want the macro to
move from sheet 1 cell h23 to sheet 2 cell b23.

This means I have to pick up the current cell position at sheet N row
P column Q and move to sheet N+1 row P column 2.

Can anyone help?
 
One way:

This assumes that any entry in Sheet1, column H causes a movement to
sheet2, column B.

Put this in the worksheet code module (right-click on the worksheet tab
and choose View code):


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count > 1 then Exit Sub
If Not Intersect(Target, Range("H:H")) Is Nothing Then
Application.Goto Sheets("Sheet2").Range("B" & Target.Row)
End If
End Sub
 
Back
Top