Sumproduct based on drop down criteria

HawkeyeBC

New Member
Joined
Mar 29, 2023
Messages
10
Office Version
  1. 2021
Platform
  1. Windows
I have a spreadsheet that tracks NFL point spread results. I have a bunch of "trends" labeled 1-20 and I want to be able to search the trends and also search a date range. For example, Trend #1 between weeks 1-12 of the NFL season is 24-9-1 and stuff like that. Is something like this possible to create?

Column Y labeled Ulk Cover is the determinant of the W/L/P
The 1-20 columns off to the right are the "trends"

1718812398284.png


YearWeekA CoverA SpreadAwayA PtsH PtsHomeH SpreadH CoverA SprA LuckA %H SprH LuckH %Rk Gap% GapULk Team7 Pt14 PtUlk RecCb RecCodeULk Cover7 PtT Cvr14 PtT CvrSame DivNumberComboPctB/SPick1234567891011121314151617181920
2023​
1​
Yes
4.5​
Lions
21​
20​
Chiefs
-4.5​
NoDog
15​
-1.20%​
Fav
5​
8.50%​
10​
9.70%​
LionsYes12-315-18AwayDogYesYesNoNo
2023​
1​
No
3.5​
Panthers
10​
24​
Falcons
-3.5​
YesDog
11​
3.20%​
Fav
26​
-5.90%​
15​
9.10%​
FalconsYes7-814-13HomeFavYesYesYesNo
2023​
1​
No
-2.5​
Bengals
3​
24​
Browns
2.5​
YesFav
7​
6.60%​
Dog
29​
-8.90%​
22​
15.50%​
BrownsYes12-1118-11HomeDogYesYesYesNo
2023​
1​
No
-5​
Jaguars
31​
21​
Colts
5​
NoFav
25​
-5.40%​
Dog
31​
-14.00%​
6​
8.60%​
ColtsYesYes6-714-15HomeDogNoYesYesYes110-4-071.4%BYesYes
2023​
1​
Yes
6​
Buccaneers
20​
17​
Vikings
-6​
NoDog
16​
-1.40%​
Fav
1​
23.70%​
15​
25.10%​
BuccaneersYes4-715-15AwayDogYesNoYesNo45-9-135.7%SYesYes
2023​
1​
Yes
3​
Titans
15​
16​
Saints
-3​
NoDog
19​
-3.20%​
Fav
32​
-18.40%​
13​
15.20%​
SaintsYes9-129-17HomeFavNoYesNoNo
2023​
1​
Yes
-2.5​
49ers
30​
7​
Steelers
2.5​
NoFav
18​
-3.10%​
Dog
12​
2.90%​
6​
6.00%​
49ersYes12-919-11AwayFavYesYesNoNo
2023​
1​
Yes
7​
Cardinals
16​
20​
Commanders
-7​
NoDog
13​
0.30%​
Fav
10​
3.50%​
3​
3.20%​
CardinalsYesYes9-815-13AwayDogYesYesYesNo3, 814-3-082.4%BYesYesYes
2023​
1​
Yes
10​
Texans
9​
25​
Ravens
-10​
NoDog
28​
-8.00%​
Fav
8​
6.40%​
20​
14.40%​
TexansYes10-719-10AwayDogNoYesYesNo102-10-016.7%SYesYes
2023​
1​
Yes
1​
Packers
38​
20​
Bears
-1​
NoDog
23​
-4.90%​
Fav
30​
-10.20%​
7​
5.30%​
BearsNo9-1116-13HomeFavNoYesYesYes5, 9, 110-1-00.0%SYesYesYesYes
2023​
1​
Yes
3.5​
Raiders
17​
16​
Broncos
-3.5​
NoDog
20​
-3.60%​
Fav
27​
-6.30%​
7​
2.70%​
BroncosYes8-1016-12HomeFavNoYesYesYes115-7-041.7%SYesYes
2023​
1​
No
-3.5​
Eagles
25​
20​
Patriots
3.5​
YesFav
2​
15.90%​
Dog
17​
-2.40%​
15​
18.30%​
PatriotsYesYes6-1611-18HomeDogNoYesYesNo616-11-059.3%BYesYes
2023​
1​
Yes
3​
Dolphins
36​
34​
Chargers
-3​
NoDog
14​
-0.10%​
Fav
9​
4.60%​
5​
4.70%​
DolphinsYesYes3-514-14AwayDogYesYesYesNo3, 814-3-082.4%BYesYesYes
2023​
1​
Yes
5.5​
Rams
30​
13​
Seahawks
-5.5​
NoDog
24​
-5.10%​
Fav
21​
-4.20%​
3​
0.90%​
RamsYesYes9-820-11AwayDogYesYesYesYes3, 814-3-082.4%BYesYesYes
2023​
1​
Yes
-3​
Cowboys
40​
0​
Giants
3​
NoFav
6​
7.70%​
Dog
3​
12.70%​
3​
5.00%​
CowboysYesYes7-616-14AwayFavYesYesYesYes8, 12, 151-0-0100.0%BYesYesYesYes
2023​
1​
No
-2.5​
Bills
16​
22​
Jets
2.5​
YesFav
4​
9.90%​
Dog
22​
-4.50%​
18​
14.40%​
JetsYes4-518-8HomeDogYesYesYesNo
2023​
2​
Push
6​
Vikings
28​
34​
Eagles
-6​
PushDog
28​
-55.10%​
Fav
1​
78.40%​
27​
133.50%​
VikingsYes5-416-11AwayDogPushYesYesNo21-5-216.7%SYesYes
2023​
2​
No
-1​
Packers
24​
25​
Falcons
1​
YesFav
6​
40.60%​
Dog
10​
27.80%​
4​
12.80%​
FalconsYesYes7-815-12HomeDogYesYesYesNo1, 6, 7, 85-3-162.5%BYesYesYesYesYes
2023​
2​
No
9.5​
Raiders
10​
38​
Bills
-9.5​
YesDog
3​
60.10%​
Fav
29​
-56.80%​
26​
116.90%​
BillsYes9-1019-14HomeFavYesYesNoNo
2023​
2​
Yes
3.5​
Ravens
27​
24​
Bengals
-3.5​
NoDog
14​
8.20%​
Fav
17​
-0.90%​
3​
9.10%​
BengalsYes9-315-15HomeFavNoYesYesYes11, 143-9-025.0%SYesYesYes
2023​
2​
Yes
5.5​
Seahawks
37​
31​
Lions
-5.5​
NoDog
26​
-37.60%​
Fav
2​
69.20%​
24​
106.80%​
SeahawksYes6-417-12AwayDogYesNoYesNo21-5-216.7%SYesYes
2023​
2​
No
-3​
Chargers
24​
27​
Titans
3​
YesFav
25​
-36.00%​
Dog
24​
-30.80%​
1​
5.20%​
ChargersYes5-512-16AwayFavNoYesNoNo
2023​
2​
No
2.5​
Bears
17​
27​
Buccaneers
-2.5​
YesDog
27​
-41.50%​
Fav
5​
54.10%​
22​
95.60%​
BearsYes9-1111-16AwayDogNoYesNoNo
2023​
2​
Yes
-3.5​
Chiefs
17​
9​
Jaguars
3.5​
NoFav
31​
-70.20%​
Dog
12​
16.90%​
19​
87.10%​
ChiefsYes6-419-14AwayFavYesYesNoNo
2023​
2​
Yes
-1​
Colts
31​
20​
Texans
1​
NoFav
21​
-17.80%​
Dog
19​
-0.90%​
2​
16.90%​
ColtsYesYes6-715-12AwayFavYesYesYesYes125-1-083.3%BYesYes
2023​
2​
No
-8​
49ers
30​
23​
Rams
8​
YesFav
11​
21.10%​
Dog
7​
36.60%​
4​
15.50%​
49ersYesYes12-916-12AwayFavNoYesYesYes84-4-050.0%BYesYes
2023​
2​
No
-5.5​
Giants
31​
28​
Cardinals
5.5​
YesFav
18​
-4.10%​
Dog
20​
-15.40%​
2​
11.30%​
CardinalsYesYes9-815-16HomeDogYesYesYesNo1, 6, 715-4-178.9%BYesYesYesYes
2023​
2​
No
9.5​
Jets
10​
30​
Cowboys
-9.5​
YesDog
4​
55.90%​
Fav
15​
3.10%​
11​
52.80%​
CowboysYes7-610-18HomeFavYesYesNoNo
2023​
2​
Yes
3.5​
Commanders
35​
33​
Broncos
-3.5​
NoDog
13​
14.50%​
Fav
30​
-61.10%​
17​
75.60%​
BroncosYes8-1015-13HomeFavNoYesNoNo
2023​
2​
Yes
-3​
Dolphins
24​
17​
Patriots
3​
NoFav
8​
35.00%​
Dog
32​
-79.40%​
24​
114.40%​
PatriotsYes6-168-21HomeDogNoYesYesNo
2023​
2​
Push
-3​
Saints
20​
17​
Panthers
3​
PushFav
9​
29.80%​
Dog
23​
-28.80%​
14​
58.60%​
PanthersYes8-913-12HomeDogPushYesYesNo
2023​
2​
No
-2.5​
Browns
22​
26​
Steelers
2.5​
YesFav
16​
0.00%​
Dog
22​
-22.10%​
6​
22.10%​
SteelersYesYes7-314-16HomeDogYesYesYesYes110-4-071.4%BYesYes
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Please check this

The logic applied is (please correct if it is wrong)

When Trend = ULK Cover, it is a W, otherwise, it is L

Logic built for P (Push) - when ULK Cover is Push, irrespective of whatever Trends are updated, the result is P

Book5
ABCDEFGHIJKLM
1WeekUlk CoverPick1234
21Trend#WeektoWeek
32113
41
52WLPPct
61NoYesYesNo31075%
72No
83No
93No
103Push
113YesYesYesYes
121YesYesYesYes
132YesYesYesYes
143Yes
153No
163No
Sheet3
Cell Formulas
RangeFormula
J6J6=LET(inp,CHOOSE(I3,D2:D16,E2:E16,F2:F16,G2:G16),(SUMPRODUCT(--(inp<>0),--(B2:B16=inp),--(A2:A16>=J3),--(A2:A16<=L3))))
K6K6=LET(inp,CHOOSE(I3,D2:D16,E2:E16,F2:F16,G2:G16),(SUMPRODUCT(--(inp<>0),--(B2:B16<>inp),--(A2:A16>=J3),--(A2:A16<=L3))))
L6L6=LET(inp,CHOOSE(I3,D2:D16,E2:E16,F2:F16,G2:G16),(SUMPRODUCT(--(inp<>0),--(B2:B16="push"),--(A2:A16>=J3),--(A2:A16<=L3))))
M6M6=J6/SUM(J6:L6)
 
Upvote 0
Try:
Book1
BCBDBEBF
1Trend#WeektoWeek
2112
3WLP
4310
Sheet7
Cell Formulas
RangeFormula
BD4BD4=SUM(($B$2:$B$33>=$BD$2)*($B$2:$B$33<=$BF$2)*($AH$1:$BA$1=$BC$2)*($AH$2:$BA$33="Yes")*($Y$2:$Y$33="Yes"))
BE4BE4=SUM(($B$2:$B$33>=$BD$2)*($B$2:$B$33<=$BF$2)*($AH$1:$BA$1=$BC$2)*($AH$2:$BA$33="Yes")*($Y$2:$Y$33="No"))
BF4BF4=SUM(($B$2:$B$33>=$BD$2)*($B$2:$B$33<=$BF$2)*($AH$1:$BA$1=$BC$2)*($AH$2:$BA$33="Yes")*($Y$2:$Y$33="Push"))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top