Excel vba

  • Thread starter Thread starter Neorig
  • Start date Start date
N

Neorig

Hello

i am trying to currently build a worksheet where on the first
worksheet(named input) i will enter data in 6 cells. I then need that to
transfer to each individual worksheets depending on name, For example
anything that i type regarding "paul" goes on the worksheet that is named
paul. And on top of that even if i delete the information on paul on the
input worksheet then its still stays on Pauls worksheet.
I have tried a few things but i cant get the visual basic code right as i am
quite a novice at this. Can anyone please please help

Thank you
 
Post your code and tell us what " i cant get the visual basic code right "
means
 
The visual basic code i have on the input sheet is:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$5" Then
Call KeepData(Target)
End If
If Target.Address = "$D$5" Then
Call KeepData(Target)
End If

End Sub

And on the worksheet i want it to keep the data on i have the following
module set up:

Public Sub KeepData(ByVal Target As Range)

If Len(Trim(Target.Value)) = 0 Then Exit Sub
Dim wksTarget As Worksheet
Set wksTarget = Worksheets("RecordSheet")
' Find the end of the list
Dim NewEntryCell As Range
Set NewEntryCell =
wksTarget.Range("a1").Offset(wksTarget.Range("a1").CurrentRegion.Rows.Count,
0)
NewEntryCell.Value = Target.Value


End Sub

hope that helps
 
You need to give more info here or send to the address below your workbook
and a clear explanation of what you want along with examples.
 

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