Need to Convert SUMIFS Formula so that closed Workbook can be referenced

ExcelUser678

New Member
Joined
Jan 6, 2024
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm trying to convert the formula below so that a closed workbook can be referenced on a workbook to be posted within Teams. Any assistance would be appreciated!

=SUMIFS('[DATA EXPORTS.xlsx]HOURS EXPORT - TASK SUMMARY'!$E:$E,'[DATA EXPORTS.xlsx]HOURS EXPORT - TASK SUMMARY'!$J:$J,S5)

Also asked here Need to Convert SUMIFS Formula so that closed Workbook can be referenced
 
Last edited by a moderator:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Suggestion
1. limit the ranges to a reasonable number
2. try SumProduct or Sum

I show two examples of the syntax. Review and try with your data; covert the filenames and ranges etc.
VBA Code:
to your information.

SumProduct2022a.xlsm
ABCD
1
2
3ABC500
4CCC2000
5
6ABC500
7CCC2000
8
9
7d
Cell Formulas
RangeFormula
D3:D4D3=SUMPRODUCT(--('D:\Excel14\[Data21.xlsm]Co_List'!$E$5:$E$50=C3),'D:\Excel14\[Data21.xlsm]Co_List'!$J$5:$J$50)
D6:D7D6=SUM(('D:\Excel14\[Data21.xlsm]Co_List'!$E$5:$E$50=C6)*'D:\Excel14\[Data21.xlsm]Co_List'!$J$5:$J$50)


SumProduct2022a.xlsm
ABCD
1
2
3ABC500
4CCC2000
5
6ABC500
7CCC2000
8
7d
Cell Formulas
RangeFormula
D3:D4D3=SUMPRODUCT(--([Data21.xlsm]Co_List!$E$5:$E$50=C3),[Data21.xlsm]Co_List!$J$5:$J$50)
D6:D7D6=SUM(([Data21.xlsm]Co_List!$E$5:$E$50=C6)*[Data21.xlsm]Co_List!$J$5:$J$50)
 
Upvote 0
Solution
I'm still getting a value error and I think it has to do with the fact that the data in Column J in my source data returns some #N/A values. Any suggestions for workarounds to remove the #N/A values - correcting the error causing it is not an option...
 
Upvote 0
What syntax did you use with your SumProduct formula?

You may secure additional help if you post an extract of your sheet (say 10 rows of relevant data) and show the expected results.
N.B. You can post an extract with the forum's tool that is named XL2BB.

"Any suggestions for workarounds to remove the #N/A values - correcting the error causing it is not an option..."
But you want results from a formula?
 
Upvote 0
I got everything working now! I created an IFERROR formula to return x if my XLOOKUP returned N/A and then utilized the SUM formula to curcumvent the closed workbook! Thank you for all your help!
 
Upvote 0
If you are using XLookup it has IfError built in. Just put your replacement value in the 4th position (if_not_found)
=xlookup(lookup_value, lookup_array, return_array, if_not_found, match_mode,s earch_mode)
 
Upvote 1
On a more general note, the new Filter function will do closed workbooks and is pretty flexible.
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,077
Members
449,094
Latest member
mystic19

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