Hi BehrBrew
Will the Data in Master ALWAYS be new Data (Data that's not been previously transfered)?
Hi BehrBrew
Will the Data in Master ALWAYS be new Data (Data that's not been previously transfered)?
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Jaslake,
Yes. That will be the most current data. The only history will be on the individual tabs. If it is easier to set up a running data page that contains the entire history, that would be okay. I would just need to set a page for the current results for the the group supervisor.
Thanks for your help.
Hi BehrBrew
I've added two Modules to your Sample Workbook and an additional Worksheet named "Template".
In order for the Code in Module Transfer to function properly the Formulas in the Individual Player sheets in Range("B3:F33") need to be cleared. This Code does thatThe Code in Module Transfer is the Code that distributes the Master Records to the Individual Player sheets. The Code will add a new Worksheet for any new Player if the Individual Player sheet does not already exist. You'll receive a message that the New Player Sheet has been added. This Code runs from a Button on Master sheet.![]()
Option Explicit Sub Clear_Stuff() Dim ws As Worksheet Dim rng As Range For Each ws In ThisWorkbook.Worksheets If Not ws.Name = "MASTER" And Not ws.Name = "HIGH" And Not ws.Name = "AVERAGE" _ And Not ws.Name = "LOW" And Not ws.Name = "Template" Then With ws Set rng = .Range("B3:F33") rng.ClearContents End With End If Next ws End Sub
I've not monkeyed with Cells B34 to G39 in the Individual Player Sheets...only you know what these are to do. Of course, try the Code n the Sample file and/or a COPY of your live file. Let me know of issues.![]()
Option Explicit Sub Transfer_Data() Dim ws As Worksheet Dim rng As Range, cel As Range, myCell As String Dim LR As Long Dim NR1 As Long Set ws = Sheets("Master") With ws LR = .Cells(5, 2).End(xlDown).Row For Each cel In .Range("B5:B" & LR) If Not WorksheetExists(cel.Text) Then Worksheets.Add(Before:=Worksheets("HIGH")).Name = cel.Text Sheets("Template").Cells.Copy Sheets(cel.Text).Range("A1").PasteSpecial Application.CutCopyMode = False MsgBox cel.Text & " has been added" Sheets(cel.Text).Range("B1").Value = cel.Text End If With Sheets(cel.Text) Set rng = .Range("B2", .Cells(.Rows.Count, "B").End(xlUp)) myCell = rng.Find("Last", , xlValues, xlWhole, xlByRows, xlNext, False).Offset(-2, 0).Address NR1 = .Range(myCell).End(xlUp).Row + 1 .Cells(NR1, "B").Resize(1, 5).Value = cel.Offset(0, 1).Resize(1, 5).Value End With Next cel End With End Sub Function WorksheetExists(SheetName As String, _ Optional WhichBook As Workbook) As Boolean 'from Chip Pearson Dim WB As Workbook Set WB = IIf(WhichBook Is Nothing, ThisWorkbook, WhichBook) On Error Resume Next WorksheetExists = CBool(Len(WB.Worksheets(SheetName).Name) > 0) End Function
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks