Spreadsheet: 735971d1623290815-wins-and-losses-last-5-games-ats-nfl
Sheet: Sheet1

 | AWAY | HOME | AWAY SCORE | HOME SCORE |  |  | AWAY ATS RESULT | HOME ATS RESULT |  |  |  | Overall ATS WINS Last 5 | Overall ATS LOSS Last 5 | ATS STREAK | Good evening, was hoping for some help on 2 formulas. I am trying to get the total ATS(against the spread) wins and ATS losses in the last 5 games for teams.For example the Texans are 3 ATSW and 2 ATSL.
away | Texans | Chiefs | 20 | 34 |  |  | L | W |  |  | Bears |  |  |  | I have a formula but don't think that it is correct because its giving wrong numbers.
away | Chargers | Bengals | 16 | 13 |  |  | L | W |  |  | Bengals |  |  |  | The formula I am using is, =COUNTIF(INDEX(B$2:[NAME]:I$257=H2,ROW(H$2:I$257)-ROW(B$2)+1),5)):H$257,B2).
away | Jets | Bills | 17 | 27 |  |  | L | W |  |  | Bills
away | Seahawks | Falcons | 38 | 25 |  |  | W | L |  |  | Broncos
away | Cardinals | Fortyniners | 24 | 20 |  |  | W | L |  |  | [NAME]
away | Colts | [NAME] | 20 | 27 |  |  | L | W |  |  | Buccaneers
away | Bears | Lions | 27 | 23 |  |  | W | L |  |  | Cardinals |  |  |  | The other thing I am looking for is how to calculate current streak, wether its -1 or 1.
away | Raiders | Panthers | 34 | 30 |  |  | W | L |  |  | Chargers
away | [NAME] | Patriots | 11 | 21 |  |  | L | W |  |  | Chiefs |  |  |  | As games are played I add the game results to the bottom of the sheet.
away | Cowboys | [NAME] | 17 | 20 |  |  | L | W |  |  | Colts
away | [NAME] | Ravens | 6 | 38 |  |  | L | W |  |  | Cowboys
away | Eagles | Washington | 17 | 27 |  |  | L | W |  |  | [NAME]
away | Buccaneers | Saints | 23 | 34 |  |  | L | W |  |  | Eagles
away | Packers | Vikings | 43 | 34 |  |  | W | L |  |  | Falcons
away | Titans | Broncos | 16 | 14 |  |  | L | W |  |  | Fortyniners
away | Steelers | Giants | 26 | 16 |  |  | W | L |  |  | Giants
away | Bengals | [NAME] | 30 | 35 |  |  | W | L |  |  | [NAME]
away | Giants | Bears | 13 | 17 |  |  | W | L |  |  | Jets
away | Panthers | Buccaneers | 17 | 31 |  |  | L | W |  |  | Lions
away | Washington | Cardinals | 15 | 30 |  |  | L | W |  |  | Packers
away | Chiefs | Chargers | 23 | 20 |  |  | L | W |  |  | Panthers
away | Vikings | Colts | 11 | 28 |  |  | L | W |  |  | Patriots
away | Falcons | Cowboys | 39 | 40 |  |  | W | L |  |  | Raiders
away | Bills | [NAME] | 31 | 28 |  |  | L | W |  |  | [NAME]
away | [NAME] | Eagles | 37 | 19 |  |  | W | L |  |  | Ravens
away | Fortyniners | Jets | 31 | 13 |  |  | W | L |  |  | Saints
away | Lions | Packers | 21 | 42 |  |  | L | W |  |  | Seahawks
away | Patriots | Seahawks | 30 | 35 |  |  | L | W |  |  | Steelers
away | Broncos | Steelers | 21 | 26 |  |  | W | L |  |  | Texans
away | Ravens | Texans | 33 | 16 |  |  | W | L |  |  | Titans
away | [NAME] | Titans | 30 | 33 |  |  | W | L |  |  | Vikings
away | Saints | Raiders | 24 | 34 |  |  | L | W |  |  | Washington
away | [NAME] | [NAME] | 31 | 13 |  |  | W | L
away | [NAME] | Bills | 32 | 35 |  |  | L | W
away | Buccaneers | Broncos | 28 | 10 |  |  | W | L
away | Washington | [NAME] | 20 | 34 |  |  | L | W
away | Lions | Cardinals | 26 | 23 |  |  | W | L
away | Panthers | Chargers | 21 | 16 |  |  | W | L
away | Jets | Colts | 7 | 36 |  |  | L | W
away | Bengals | Eagles | 23 | 23 |  |  | W | L
away | Bears | Falcons | 30 | 26 |  |  | W | L
away | Fortyniners | Giants | 36 | 9 |  |  | W | L
away | Raiders | Patriots | 20 | 36 |  |  | L | W
away | Packers | Saints | 37 | 30 |  |  | W | L
away | Cowboys | Seahawks | 31 | 38 |  |  | L | W
away | Texans | Steelers | 21 | 28 |  |  | L | W
away | Titans | Vikings | 31 | 30 |  |  | L | W
away | Chiefs | Ravens | 34 | 20 |  |  | W | L
away | Broncos | Jets | 37 | 28 |  |  | W | L
away | Colts | Bears | 19 | 11 |  |  | W | L
away | [NAME] | Bengals | 25 | 33 |  |  | L | W
away | Chargers | Buccaneers | 31 | 38 |  |  | L | W
away | [NAME] | Cowboys | 49 | 38 |  |  | W | L
away | Seahawks | [NAME] | 31 | 23 |  |  | W | L
away | Eagles | Fortyniners | 25 | 20 |  |  | W | L
away | Saints | Lions | 35 | 29 |  |  | W | L
away | Cardinals | Panthers | 21 | 31 |  |  | L | W
away | Bills | Raiders | 30 | 23 |  |  | W | L
away | Giants | [NAME] | 9 | 17 |  |  | W | L
away | Ravens | Washington | 31 | 17 |  |  | L | W
away | Vikings | Texans | 31 | 23 |  |  | W | L
away | Falcons | Packers | 16 | 30 |  |  | L | W
away | Patriots | Chiefs | 10 | 26 |  |  | L | W
away | Buccaneers | Bears | 19 | 20 |  |  | L | W
away | Colts | [NAME] | 23 | 32 |  |  | L | W
away | Raiders | Chiefs | 40 | 32 |  |  | W | L
away | Giants | Cowboys | 34 | 37 |  |  | W | L
away | Panthers | Falcons | 23 | 16 |  |  | W | L
away | [NAME] | Fortyniners | 43 | 17 |  |  | W | L
away | Cardinals | Jets | 30 | 10 |  |  | W | L
away | Bengals | Ravens | 3 | 27 |  |  | L | W
away | [NAME] | Washington | 30 | 10 |  |  | W | L
away | Vikings | Seahawks | 26 | 27 |  |  | W | L
away | Eagles | Steelers | 29 | 38 |  |  | L | W
away | [NAME] | Texans | 14 | 30 |  |  | L | W
away | Chargers | Saints | 27 | 30 |  |  | W | L
away | Bills | Titans | 16 | 42 |  |  | L | W
away | Broncos | Patriots | 18 | 12 |  |  | W | L
away | Packers | Buccaneers | 10 | 38 |  |  | L | W
away | Bengals | Colts | 27 | 31 |  |  | W | L
away | Ravens | Eagles | 30 | 28 |  |  | L | W
away | [NAME] | Fortyniners | 16 | 24 |  |  | L | W
away | Washington | Giants | 19 | 20 |  |  | W | L
away | Lions | [NAME] | 34 | 16 |  |  | W | L
away | Bears | Panthers | 23 | 16 |  |  | W | L
away | [NAME] | Steelers | 7 | 38 |  |  | L | W
away | Texans | Titans | 36 | 42 |  |  | L | W
away | Falcons | Vikings | 40 | 23 |  |  | W | L
away | Jets | [NAME] | 0 | 24 |  |  | L | W
away | Chiefs | Bills | 26 | 17 |  |  | W | L
away | Cardinals | Cowboys | 38 | 10 |  |  | W | L
away | Giants | Eagles | 21 | 22 |  |  | W | L
away | [NAME] | Bengals | 37 | 34 |  |  | L | W
away | Chiefs | Broncos | 43 | 16 |  |  | W | L
away | Seahawks | Cardinals | 34 | 37 |  |  | L | W
away | Lions | Falcons | 23 | 22 |  |  | W | L
away | Bills | Jets | 18 | 10 |  |  | L | W
away | Fortyniners | Patriots | 33 | 6 |  |  | W | L
away | Buccaneers | Raiders | 45 | 20 |  |  | W | L
away | Cowboys | Washington | 3 | 25 |  |  | L | W
away | Panthers | Saints | 24 | 27 |  |  | W | L
away | Packers | Texans | 35 | 20 |  |  | W | L
away | [NAME] | Chargers | 29 | 39 |  |  | L | W
away | Steelers | Titans | 27 | 24 |  |  | W | L
away | Bears | [NAME] | 10 | 24 |  |  | L | W
away | Falcons | Panthers | 25 | 17 |  |  | W | L
away | Chargers | Broncos | 30 | 31 |  |  | L | W
away | Steelers | Ravens | 28 | 24 |  |  | W | L
away | Saints | Bears | 26 | 23 |  |  | L | W
away | Titans | Bengals | 20 | 31 |  |  | L | W
away | Patriots | Bills | 21 | 24 |  |  | W | L
away | Raiders | [NAME] | 16 | 6 |  |  | W | L
away | Jets | Chiefs | 9 | 35 |  |  | L | W
away | [NAME] | [NAME] | 17 | 28 |  |  | L | W
away | Cowboys | Eagles | 9 | 23 |  |  | L | W
away | Colts | Lions | 41 | 21 |  |  | W | L
away | Vikings | Packers | 28 | 22 |  |  | W | L
away | Fortyniners | Seahawks | 27 | 37 |  |  | L | W
away | Buccaneers | Giants | 25 | 23 |  |  | L | W
away | Packers | Fortyniners | 34 | 17 |  |  | W | L
away | Seahawks | Bills | 34 | 44 |  |  | L | W
away | Saints | Buccaneers | 38 | 3 |  |  | W | L
away | [NAME] | Cardinals | 34 | 31 |  |  | W | L
away | Raiders | Chargers | 31 | 26 |  |  | W | L
away | Panthers | Chiefs | 31 | 33 |  |  | W | L
away | Ravens | Colts | 24 | 10 |  |  | W | L
away | Steelers | Cowboys | 24 | 19 |  |  | L | W
away | Broncos | Falcons | 27 | 34 |  |  | L | W
away | Texans | [NAME] | 27 | 25 |  |  | L | W
away | Giants | Washington | 23 | 20 |  |  | W | L
away | Bears | Titans | 17 | 24 |  |  | L | W
away | Lions | Vikings | 20 | 34 |  |  | L | W
away | Patriots | Jets | 30 | 27 |  |  | L | W
away | Colts | Titans | 34 | 17 |  |  | W | L
away | Chargers | [NAME] | 21 | 29 |  |  | L | W
away | Texans | [NAME] | 7 | 10 |  |  | W | L
away | Bills | Cardinals | 30 | 32 |  |  | W | L
away | Eagles | Giants | 17 | 27 |  |  | L | W
away | Washington | Lions | 27 | 30 |  |  | L | W
away | [NAME] | Packers | 20 | 24 |  |  | W | L
away | Buccaneers | Panthers | 46 | 23 |  |  | W | L
away | Ravens | Patriots | 17 | 23 |  |  | L | W
away | Broncos | Raiders | 12 | 37 |  |  | L | W
away | Seahawks | [NAME] | 16 | 23 |  |  | L | W
away | Fortyniners | Saints | 13 | 27 |  |  | L | W
away | Bengals | Steelers | 10 | 36 |  |  | L | W
away | Vikings | Bears | 19 | 13 |  |  | W | L
away | Cardinals | Seahawks | 21 | 28 |  |  | L | W
away | [NAME] | Broncos | 13 | 20 |  |  | L | W
away | Jets | Chargers | 28 | 34 |  |  | W | L
away | Eagles | [NAME] | 17 | 22 |  |  | L | W
away | Packers | Colts | 31 | 34 |  |  | L | W
away | Steelers | [NAME] | 27 | 3 |  |  | W | L
away | Lions | Panthers | 0 | 20 |  |  | L | W
away | Chiefs | Raiders | 35 | 31 |  |  | L | W
away | Titans | Ravens | 30 | 24 |  |  | W | L
away | Bengals | Washington | 9 | 20 |  |  | L | W
away | Falcons | Saints | 9 | 24 |  |  | L | W
away | Patriots | Texans | 20 | 27 |  |  | L | W
away | Cowboys | Vikings | 31 | 28 |  |  | W | L
away | [NAME] | Buccaneers | 27 | 24 |  |  | W | L
away | Washington | Cowboys | 41 | 16 |  |  | W | L
away | Texans | Lions | 41 | 25 |  |  | W | L
away | Giants | Bengals | 19 | 17 |  |  | L | W
away | Chargers | Bills | 17 | 27 |  |  | L | W
away | Saints | Broncos | 31 | 3 |  |  | W | L
away | Chiefs | Buccaneers | 27 | 24 |  |  | L | W
away | Titans | Colts | 45 | 26 |  |  | W | L
away | Raiders | Falcons | 6 | 43 |  |  | L | W
away | [NAME] | [NAME] | 27 | 25 |  |  | L | W
away | [NAME] | Jets | 20 | 3 |  |  | W | L
away | Bears | Packers | 25 | 41 |  |  | L | W
away | Cardinals | Patriots | 17 | 20 |  |  | L | W
away | Fortyniners | [NAME] | 23 | 20 |  |  | W | L
away | Panthers | Vikings | 27 | 28 |  |  | W | L
away | Seahawks | Eagles | 23 | 17 |  |  | L | W
away | Ravens | Steelers | 14 | 19 |  |  | W | L
away | Lions | Bears | 34 | 30 |  |  | W | L
away | [NAME] | Cardinals | 38 | 28 |  |  | W | L
away | Patriots | Chargers | 45 | 0 |  |  | W | L
away | Broncos | Chiefs | 16 | 22 |  |  | W | L
away | Bengals | [NAME] | 7 | 19 |  |  | L | W
away | Saints | Falcons | 21 | 16 |  |  | W | L
away | Raiders | Jets | 31 | 28 |  |  | L | W
away | Eagles | Packers | 16 | 30 |  |  | L | W
away | Giants | Seahawks | 17 | 12 |  |  | W | L
away | Colts | Texans | 26 | 20 |  |  | W | L
away | [NAME] | Titans | 41 | 35 |  |  | W | L
away | [NAME] | Vikings | 24 | 27 |  |  | W | L
away | Washington | Steelers | 23 | 17 |  |  | W | L
away | Cowboys | Ravens | 17 | 34 |  |  | L | W
away | Patriots | [NAME] | 3 | 24 |  |  | L | W
away | Texans | Bears | 7 | 36 |  |  | L | W
away | Cowboys | Bengals | 30 | 7 |  |  | W | L
away | Steelers | Bills | 15 | 26 |  |  | L | W
away | Vikings | Buccaneers | 14 | 26 |  |  | L | W
away | Falcons | Chargers | 17 | 20 |  |  | L | W
away | Chiefs | [NAME] | 33 | 27 |  |  | L | W
away | Saints | Eagles | 21 | 24 |  |  | L | W
away | Cardinals | Giants | 26 | 7 |  |  | W | L
away | Titans | [NAME] | 31 | 10 |  |  | W | L
away | Packers | Lions | 31 | 24 |  |  | L | W
away | Broncos | Panthers | 32 | 27 |  |  | W | L
away | Colts | Raiders | 44 | 27 |  |  | W | L
away | Jets | Seahawks | 3 | 40 |  |  | L | W
away | Ravens | [NAME] | 47 | 42 |  |  | W | L
away | Chargers | Raiders | 30 | 27 |  |  | W | L
away | Bills | Broncos | 48 | 19 |  |  | W | L
away | Panthers | Packers | 16 | 24 |  |  | W | L
away | Eagles | Cardinals | 26 | 33 |  |  | L | W
away | Texans | Colts | 20 | 27 |  |  | W | L
away | Fortyniners | Cowboys | 33 | 41 |  |  | L | W
away | Patriots | [NAME] | 12 | 22 |  |  | L | W
away | Buccaneers | Falcons | 31 | 27 |  |  | L | W
away | [NAME] | Giants | 20 | 6 |  |  | W | L
away | [NAME] | Ravens | 14 | 40 |  |  | L | W
away | Seahawks | Washington | 20 | 15 |  |  | W | L
away | Chiefs | Saints | 32 | 29 |  |  | L | W
away | Lions | Titans | 25 | 46 |  |  | L | W
away | Bears | Vikings | 33 | 27 |  |  | W | L
away | Jets | [NAME] | 23 | 20 |  |  | W | L
away | Steelers | Bengals | 17 | 27 |  |  | L | W
away | Vikings | Saints | 33 | 52 |  |  | L | W
away | [NAME] | Raiders | 26 | 25 |  |  | L | W
away | Buccaneers | Lions | 47 | 7 |  |  | W | L
away | Fortyniners | Cardinals | 20 | 12 |  |  | W | L
away | Broncos | Chargers | 16 | 19 |  |  | L | W
away | Falcons | Chiefs | 14 | 17 |  |  | W | L
away | Eagles | Cowboys | 17 | 37 |  |  | L | W
away | Bears | [NAME] | 41 | 17 |  |  | W | L
away | [NAME] | Jets | 16 | 23 |  |  | L | W
away | Titans | Packers | 14 | 40 |  |  | L | W
away | Giants | Ravens | 13 | 27 |  |  | L | W
away | Panthers | Washington | 20 | 13 |  |  | W | L
away | [NAME] | Seahawks | 9 | 20 |  |  | L | W
away | Colts | Steelers | 24 | 28 |  |  | L | W
away | Bengals | Texans | 37 | 31 |  |  | W | L
away | Bills | Patriots | 38 | 9 |  |  | W | L
away | Packers | Bears | 35 | 16 |  |  | W | L
away | Ravens | Bengals | 38 | 3 |  |  | W | L
away | [NAME] | Bills | 26 | 56 |  |  | L | W
away | Raiders | Broncos | 32 | 31 |  |  | L | W
away | Steelers | [NAME] | 22 | 24 |  |  | W | L
away | Falcons | Buccaneers | 27 | 44 |  |  | L | W
away | Chargers | Chiefs | 38 | 21 |  |  | W | L
away | [NAME] | Colts | 14 | 28 |  |  | L | W
away | Washington | Eagles | 20 | 14 |  |  | W | L
away | Cowboys | Giants | 19 | 23 |  |  | L | W
away | Vikings | Lions | 37 | 35 |  |  | L | W
away | Saints | Panthers | 33 | 7 |  |  | W | L
away | Jets | Patriots | 14 | 28 |  |  | L | W
away | Cardinals | [NAME] | 7 | 18 |  |  | L | W
away | Titans | Texans | 41 | 38 |  |  | L | W
away | Cardinals | [NAME] | 7 | 18 |  |  | L | W
away | Titans | Texans | 41 | 38 |  |  | L | W
 |  |  |  |  |  |  |  |  |  |  | Texans