Manipulating Text between sheets, in a workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top