View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Excel workbook, same name on diff sheets, need the next column and

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Const WS_RANGE As String = "A:A" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Sh.Name < "Master" Then

If Not Intersect(Target, Sh.Range(WS_RANGE)) Is Nothing Then

With Target

If Application.CountIf(Range("Master!A:A"), Target.Value) =
0 Then

Worksheets("Master").Range("A1").End(xlDown).Offse t(1,
0).Value = Target.Value
End If
End With
End If
End If

ws_exit:
Application.EnableEvents = True

End Sub


--
__________________________________
HTH

Bob

"ycwkpp898" wrote in message
...
hi i have a workbook. which has different days of the week as sheets, in
the
sheets is names eg
Player Points
Abbey 2
Bethany 6
Carol 9

but on other days theres more or less names.
on my main sheet i have a list of names. but would like to have this list
automatically added to if there is a new player on a day. instead of
adding
automatically.
back to the problem i have
i want to add up each players totals and display them on the main page.
please can anyone help me
thank you for any help you give