![]()
Dim rngRowToCheck As Excel.Range Dim rngTeamDetails As Excel.Range Dim strTeamLookFor As String Dim rw As Excel.Range Dim cell As Excel.Range Dim intPresentationRowNumber As Integer Dim wsTeamSheet As Excel.Worksheet Dim wsLookup As Excel.Worksheet Set wsTeamSheet = ThisWorkbook.Worksheets("Team Sheet") Set wsLookup = ThisWorkbook.Worksheets("Lookup") Set rngRowToCheck = wsTeamSheet.Rows("3:3") Set rngTeamDetails = wsLookup.Range("c1:e35") For Each cell In rngRowToCheck.Cells If LCase(cell.Value) Like "team*" Then intPresentationRowNumber = 10 strTeamToLookFor = LCase(cell.Value) For Each rw In rngTeamDetails.Rows If LCase(rw.Cells(, 3).Value) = strTeamToLookFor Then wsTeamSheet.Cells(intPresentationRowNumber, cell.Column + 1).Value = rw.Cells(, 2).Value intPresentationRowNumber = intPresentationRowNumber + 1 End If Next rw End If Next cell
Bookmarks