INDIRECT function works with COUNTIF but not with SUMPRODUCT

Mariner

New Member
Joined
Dec 12, 2005
Messages
24
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: 1

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,794
Office Version
  1. 365
Platform
  1. Windows
You're missing the closing quotes at the end of the range in the indirect function.
 
Solution

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,794
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,129
Messages
5,628,869
Members
416,347
Latest member
AT2021

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
Top