Why is my sumproduct with indirect forumla only returning the first result? Google Sheets

korfballchick

New Member
Joined
Aug 8, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have multiple tabs which contain stats from different sports matches.
I want to create a summary sheet which sums data from the various columns based on the name of the athlete.

I have used this formula:
=ArrayFormula(SUMPRODUCT(SUMIF(INDIRECT("'"&WalesMatches&"'!A7:A25"),A14,INDIRECT("'"&WalesMatches&"'!L7:L25"))))

In which "WalesMatches" is a named range for the separate tabs.
A7:A25 is where the name of the athlete is entered on the various tabs
L7:L25 is the total of shots scored on the various tabs

Can anyone explain why this isn't returning the sum of all tab? I'm only getting the first tab's total (i.e. if I change the tabs contained in the named range, I still only get the total from the first tab to pull through, not the sum of all tabs).
 
Last edited by a moderator:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
How is the formula even giving the sum of "First Tab"

Can you help me by posting your data using xl2bb. I have doubt because Sumif's range argument doesn't accept formula range!!!
 
Upvote 0
I figured it out

So Sumif range argument doesnt accept range generated by formula other than Indirect. However Indirect function doesn't accept named ranges accept only one criteria.
So you have to break down the Indirect part of it

Balance Quantity.xlsx
JKLMNOP
3Named RangesVALUES IN SHEETS
4Sheet11234
5Sheet25678
6Sheet30
7
8
9
10Criteria
11226
12
Sheet5
Cell Formulas
RangeFormula
L4:O5L4=TRANSPOSE(INDIRECT("'"&K4&"'!A1:A4"))
L6L6=IFERROR(TRANSPOSE(INDIRECT("'"&K6&"'!A1:A4")),0)
K11K11=SUM(IF(K4:K6=J11,$L$4:$O$6))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
Named=Sheet5!$K$4:$K$5L4, K11
 
Upvote 0
Is this an Excel or Google Sheets question?
 
Upvote 0
Is the working different???

Does Google Sheet cover Multiple Range in Indirect???
 
Upvote 0
If this is for Excel, just use
=SUMPRODUCT(SUMIF(INDIRECT("'"&WalesMatches&"'!A7:A25"),A14,INDIRECT("'"&WalesMatches&"'!L7:L25")))
 
Upvote 0
So @Fluff please help me figure out as how is this working

also i tried to solve it using a tubular format
Balance Quantity.xlsx
ABCDEF
1Players Name
2PunitAyushRahul
3Sheet Name----->Match1132
4Match2111012
5Match3   
6Match4   
7Total121314
8
9
10Punit12
11
12
Sheet5
Cell Formulas
RangeFormula
C3:E6C3=IFERROR(VLOOKUP(C$2,INDIRECT($B3&"!A2:B4"),2,0),"")
C7:E7C7=SUM(C3:C6)
D10D10=INDEX($C$7:$E$7,MATCH(C10,$C$2:$E$2,0))
Named Ranges
NameRefers ToCells
Wales_M=Sheet5!$B$3:$B$6C3:E3


Balance Quantity.xlsx
AB
1NameScores
2Punit1
3Rahul2
4Ayush3
Match1


Balance Quantity.xlsx
AB
1NameScores
2Ayush10
3Punit11
4Rahul12
5
Match2
 
Upvote 0
Yes it does, whilst there are a lot of similarities, they are not the same.
In future you should specify that it's for Google Sheets & it needs to be posted in the "General Discussion & Other Applications" section.
 
Upvote 0

Forum statistics

Threads
1,223,346
Messages
6,171,566
Members
452,410
Latest member
memote1

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