SUMPRODUCT Help

AYouQueTai

Board Regular
Joined
Sep 14, 2019
Messages
50
Office Version
  1. 365
Platform
  1. Windows
Hello,

The following formula (In G2) is giving me a result of "0" when it should display the player's first name.
The reason for the indirect reference is every team will have their own sheet like Buffalo.
=SUMPRODUCT((INDIRECT($D2&"[Start Date]")>=[@Date])*(INDIRECT($D2&"[End Date]")<=[@Date])*(INDIRECT($D2&"[Jersey]")=[@Jersey]),(INDIRECT($D2&"[First Name]")))

Can anyone tell me what I'm doing wrong?

NHL 2024-2025.xlsx
ABCDEFGHI
1GameIdDateHome/AwayTeamJerseyPosFirst NameLast NameFull Name
2020001Oct-04HomeBuffalo020
Roster
Cell Formulas
RangeFormula
B2B2=IF([@GameId]="","",VLOOKUP([@GameId],Schedule,3,FALSE))
D2D2=IF($A2="","",IF($C2="Away",VLOOKUP([@GameId],Schedule,5,FALSE),VLOOKUP([@GameId],Schedule,6,FALSE)))
G2G2=SUMPRODUCT((INDIRECT($D2&"[Start Date]")>=[@Date])*(INDIRECT($D2&"[End Date]")<=[@Date])*(INDIRECT($D2&"[Jersey]")=[@Jersey]),(INDIRECT($D2&"[First Name]")))
Cells with Data Validation
CellAllowCriteria
C2:C1048576List=INDIRECT("HomeAway")


NHL 2024-2025.xlsx
ABCDEFG
1JerseyStart DateEnd DatePosFirst NameLast NameFull Name
202Oct-03-2024Oct-04-2025Test
305Oct-03-2024Oct-04-2025Test 5
Buffalo
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Sumproduct returns numbers, it cannot return texts.
To use indirect, you must reference the sheet and a range and you are referencing a table.

Try the next one. I put a range of 100 rows. You can adjust it.


Excel Formula:
=FILTER(INDIRECT("'"&[@Team]&"'!$E$2:$E$100"),(INDIRECT("'"&[@Team]&"'!$B$2:$B$100")<=[@Date])*(INDIRECT("'"&[@Team]&"'!$C$2:$C$100")>=[@Date])*(INDIRECT("'"&[@Team]&"'!$A$2:$A$100")=[@Jersey]))

🤗
 
Upvote 1
Solution
Is there a way to make the Ranges Dynamic?
For Example $E$2:$E$100 will always be [First Name] in the Team's worksheet and table.
$B$2:$B$100 will always be [Start Date] etc..
 
Upvote 0
This would be an alternative.
In the K:L columns (or in the columns that you have available), put the names of the sheets and their respective table name.
Then use the following formula:

Excel Formula:
=LET(a,VLOOKUP([@Team],K:L,2,0),FILTER(INDIRECT(a&"[First Name]"),(INDIRECT(a&"[Start Date]")<=[@Date])*(INDIRECT(a&"[End Date]")>=[@Date])*(INDIRECT(a&"[Jersey]")=[@Jersey])))

Ex:
1727574836321.png
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,088
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