INDIRECT function works with COUNTIF but not with SUMPRODUCT

Mariner

New Member
Joined
Dec 12, 2005
Messages
25
1606340001386.png


Hi,

I'm trying to use the indirect function to link to branch tabs throughout my file.
Count column = +COUNTIF(INDIRECT("'"&$A8&"'!$C$6:$C$400"),$C$4)/5. This works for each branch (35, 12, 9, and so on).

Hours column = +SUMPRODUCT(--(Houston!$C$6:$C$400=$C$4),--(Houston!$F$6:$F$400=D$5),Houston!$BG$6:$BG$400). That works fine for Houston (I have that copied down for the Hours column for now; that's why the number is the same for each branch).

I want to change the hours column formula so that I can copy it down without changing the branch name every time so I used:
+SUMPRODUCT(--(INDIRECT("'"&$A8&"'!$C$6:$C$400)=$C$4),--(Houston!$F$6:$F$400=D$5),Houston!$BG$6:$BG$400) just on the first leg of the formula and I get the pop up box with "There's a problem with this formula..."

Can SUMPRODUCT and INDIRECT work together? If so, what is the fix? Thanks in advance!
 

Attachments

  • 1606339888665.png
    1606339888665.png
    5.2 KB · Views: 5

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
You're missing the closing quotes at the end of the range in the indirect function.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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