Well it is not like I'm not trying and just want someone to write my code. I have been playing with code all week and have gotten nowhere. Here is what I have so far. I made a notation above the For Each loop to explain what I am trying to do.
Sub ChooseFile()
Dim fd As FileDialog
Dim FileName As String
Dim lastRow1 As Long
Dim rcell As Range
Set fd = Application.FileDialog(msoFileDialogFilePicker)
'Get the number the button chosen.
Dim FileChosen As Integer
FileChosen = fd.Show
If FileChosen <> -1 Then
'Didn't choose anything (clicked cancel).
MsgBox "No file opened."
Exit Sub
Else
'Display name and path of file chosen.
FileName = fd.SelectedItems(1)
Workbooks.Open (FileName)
FileName = Mid(FileName, InStrRev(FileName, "\") + 1, Len(FileName))
Workbooks.Open FileName:="C:\Testing\Sample Template.xlsx"
Workbooks(FileName).Activate
lastRow1 = Range("B" & Rows.Count).End(xlUp).Row
'Want to look for each team, there are teams 1 thru 4 in column B of FileName, data is in columns A2:Y? and paste each team into
'the appropraite tabs in Sample Template workbook.
For Each rcell In Range("B2:B" & lastRow1)
If rcell.Value = "Team 2" Then
Workbooks(FileName).Range(Cells(rcell.Row, 1), Cells(recll.Row, 25)).Copy
Workbooks("Sample Template.xlsx").Worksheets("Team 2").Range("A2").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End If
Next rcell
End If
End Sub