View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Smitty Smitty is offline
external usenet poster
 
Posts: 43
Default Enter info in one sheet, auto enter in another based on one field

Sure,

You can use an Worksheet_Change event. You didn't mention any specific
ranges, so I'll just give an example:

Private Sub Worksheet_Change(ByVal Target As Range)
' Code goes in the Worksheet specific module
Dim rng As Range
' Set Target Range
Set rng = Range("D:D")
' Only look at single cell changes
If Target.Count 1 Then Exit Sub
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Action if Condition(s) are met
Target.EntireRow.Copy Sheets(Target.Text).Cells(Rows.Count,
"A").End(xlUp).Offset(1)
End Sub

Where column D is the relevant sheet name is selected.

Hope that helps,

Smitty

"The BusyHighLighter" wrote:

Hi, I'm new to excel and need very step by step basic directions :)
on how to do the following:

I have a database of names/addresses and whether or not the company is
private.
1) I want to keep a main sheet of ALL information entered
2) I want the data from one row to automatically enter into the other
appropriate sheet as I type it in

For example (and this is simplified): USDA 123 Washington Government
I would want this on the main sheet and to enter itself on the GOVERNMENT
sheet

thanks in advance for any help