Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel vba
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel vba
Post your code and tell us what " i cant get the visual basic code right "
means -- Don Guillett Microsoft MVP Excel SalesAid Software "Neorig" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel vba
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 "Don Guillett" wrote: Post your code and tell us what " i cant get the visual basic code right " means -- Don Guillett Microsoft MVP Excel SalesAid Software "Neorig" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|