SUMPRODUCT with IF, ELSE

JDCupps

New Member
Joined
Oct 24, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Afternoon, I have a spreadsheet that I created for a confidence pool I manage. The spreadsheet cuts the football season in half and each half has a column for wins/half. Each cell in that column has a corresponding formula to that shown for K3. The formula works great except for the situation shown in Column G (week 6), A Tie.... While it's true that both players did indeed win that week, I'd be much happier if Column K were to show 1.5 for both users instead (god help me if we manage to have a 3-way tie). The cells in Column K are used later on in the spreadsheet to show winnings (or lack of winnings) for each player.
Is there a way of adjusting the formula to take into account the possibility of a tie? Although I'm relatively familiar with Excel as a whole, this type of formula (if possible) is way above my abilities and any help would be hugely appreciated.
Thanks
pigskin picks wins.JPG
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Try this

Book1
BCDEFGHIJKL
3Week1Week2Week3Week4Week5Week6Formula
4BowlerxXXX2621821941661582.33
5KdogXXX2582122061561441.00
6SqueakyXXX252184180146154-
7JenneXXX21414417098138-
8BalkeXXX2401822001461580.33
9TaterXXX230210168140146-
10JustsmileXXX222177192139112-
11CoolhandXXX0174162142120-
12GinaforceXXX013505294-
13vaccinationXXX2581591681591580.33
14JerryfutonXXX2341652121641061.00
15
Sheet1
Cell Formulas
RangeFormula
K4:K14K4=SUM(--IF(D4:H4=CHOOSE({1,2,3,4,5},MAX($D$4:$D$14),MAX($E$4:$E$14),MAX($F$4:$F$14),MAX($G$4:$G$14),MAX($H$4:$H$14)),CHOOSE({1,2,3,4,5},1/SUM(--($D$4:$D$14=MAX($D$4:$D$14))),1/SUM(--($E$4:$E$14=MAX($E$4:$E$14))),1/SUM(--($F$4:$F$14=MAX($F$4:$F$14))),1/SUM(--($G$4:$G$14=MAX($G$4:$G$14))),1/SUM(--($H$4:$H$14=MAX($H$4:$H$14))))))
 
Upvote 0
Try this formula in K3
Excel Formula:
=SUM(IFERROR((RANK($C3:$J3,OFFSET($C$3,0,COLUMN($C$3:$J$3)-COLUMN($C$3),ROWS($C$3:$C$13),1),0)=1)/COUNTIF(OFFSET($C$3,0,COLUMN($C$3:$J$3)-COLUMN($C$3),ROWS($C$3:$C$13),1),$C3:$J3),0))
If your profile is showing the correct version of excel then you should have dynamic arrays, if not the formula will need to be array confirmed with ctrl shift enter.
 
Upvote 0
Solution
Try this

Book1
BCDEFGHIJKL
3Week1Week2Week3Week4Week5Week6Formula
4BowlerxXXX2621821941661582.33
5KdogXXX2582122061561441.00
6SqueakyXXX252184180146154-
7JenneXXX21414417098138-
8BalkeXXX2401822001461580.33
9TaterXXX230210168140146-
10JustsmileXXX222177192139112-
11CoolhandXXX0174162142120-
12GinaforceXXX013505294-
13vaccinationXXX2581591681591580.33
14JerryfutonXXX2341652121641061.00
15
Sheet1
Cell Formulas
RangeFormula
K4:K14K4=SUM(--IF(D4:H4=CHOOSE({1,2,3,4,5},MAX($D$4:$D$14),MAX($E$4:$E$14),MAX($F$4:$F$14),MAX($G$4:$G$14),MAX($H$4:$H$14)),CHOOSE({1,2,3,4,5},1/SUM(--($D$4:$D$14=MAX($D$4:$D$14))),1/SUM(--($E$4:$E$14=MAX($E$4:$E$14))),1/SUM(--($F$4:$F$14=MAX($F$4:$F$14))),1/SUM(--($G$4:$G$14=MAX($G$4:$G$14))),1/SUM(--($H$4:$H$14=MAX($H$4:$H$14))))))
CA-Punit, I had to alter the code to include the range of C3:J13 but it's giving me a value error. Not quite sure why. Maybe the blank cells for dates that haven't happened yet? Maybe because all the columns are conditionally formatted (although I can't see why that would matter) Here's how I changed the code:
=SUM(-IF(C3:J3=CHOOSE({1,2,3,4,5},MAX($C$3:$C$13),MAX($D$3:$D$13),MAX($E$3:$E$13),MAX($F$3:$F$13),MAX($G$3:$G$13),MAX($H$3:$H$13),MAX($I$3:$I$13),MAX($J$3:$J$13)),CHOOSE({1,2,3,4,5},1/SUM(--($C$3:$C$13=MAX($C$3:$C$13))),1/SUM(--($D$3:$D$13=MAX($D$3:$D$13))),1/SUM(--($E$3:$E$13=MAX($E$3:$E$13))),1/SUM(--($F$3:$F$13=MAX($F$3:$F$13))),1/SUM(--($G$3:$G$13=MAX($G$3:$G$13))),1/SUM(--($H$3:$H$13=MAX($H$3:$H$13))),1/SUM(--($I$3:$I$13=MAX($I$3:$I$13))),1/SUM(--($J$3:$J$13=MAX($J$3:$J$13))))))
 
Upvote 0
Try this formula in K3
Excel Formula:
=SUM(IFERROR((RANK($C3:$J3,OFFSET($C$3,0,COLUMN($C$3:$J$3)-COLUMN($C$3),ROWS($C$3:$C$13),1),0)=1)/COUNTIF(OFFSET($C$3,0,COLUMN($C$3:$J$3)-COLUMN($C$3),ROWS($C$3:$C$13),1),$C3:$J3),0))
If your profile is showing the correct version of excel then you should have dynamic arrays, if not the formula will need to be array confirmed with ctrl shift enter.
Hey Jason. that worked great, with all I've tested so far. And actually a lot less clunky than the previous code I was using.
Thanks A Bunch!!!
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,852
Members
449,096
Latest member
Erald

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