Manipulating Text between sheets, in a workbook

M

mdjennings

What I am trying to do is set up a cell where I can type in a name, and then
have that name collect under an appropriate field on another worksheet. Then
when I type in a different name, into the same cell, it collects that name
UNDER the first name on the other worksheet.
 
G

Gord Dibben

Would require event code behind the worksheet.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Target.Address = "$A$1" And Target.Value <> "" Then
Sheets("Sheet2").Cells(Rows.Count, 2).End(xlUp) _
.Offset(1, 0).Value = Target.Value
End If
stoppit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code".

Paste the above code into that sheet module.

When you enter a name in A1 that name will be copied to Sheet2 B2 then next
time you type a name in A1 that name will be copied to Sheet2 B3 and on and
on.

Adjust to suit your fields and columns.


Gord Dibben Excel MVP
 
D

Dave Peterson

This isn't quite the same thing, but you may want to try Data|Form.

You can always sort by the names later if that's a problem.
 
Top