Entire rows, that can be in any number, cann't be extracted through a formula.
Using Countif() you will get how many times that team is appearing in the first sheet, then it will be a different task to extract all rows from first sheet and put each column at proper place in Sheet B.
What you are saying doesn't even need Sheet B.
In the first Sheet itself, you select entire top heading, and click on Menu - Data - Filter.
That will put a filter on you data.
Then, the column in which your team name is there, you click on filter (the funnel icon at the end of the header name) and put a team's name and press enter.
All the rows of only that team will show up, and all rows in which that team was not there will be hidden.