Formula to replace CountIf with a ">0" criteria

kurtkaufman

New Member
Joined
Sep 26, 2016
Messages
4
Right now I have a Summary workbook (let's call it [Summary.xlsx]) which has links to about 60 other excel documents (I'll refer to as [Other.xlsx]). I'm trying to pull the last number in a column from the [Other.xlsx] documents into a cell on the summary workbook, but the [Other.xlsx] is updated weekly so I want the last number to be automatically updated into [Summary.xlsx].

I originally attempted using:

=INDEX('[Other.xlsx]Template'!$L$41:$L$45,COUNTIF('[Other.xlsx]Template'!$L$41:$L$45,">0"))

This worked exactly how I intended, but after closing [Summary.xlsx], I would get a #VALUE! error upon re-opening the file. After researching why this was happening, I found out that COUNTIF and SUMIF functions do not work well while referencing other closed workbooks. Also, I updated the Trust Center but this did not help.
I tried using a SUM(IF()) function, but to no avail due to the ">0" criteria. Everything I found online was for a "=" criteria.

Does anyone have any suggestions? :confused:
 
Welcome to the board.

Try

=INDEX('[Other.xlsx]Template'!$L$41:$L$45,SUMPRODUCT(--('[Other.xlsx]Template'!$L$41:$L$45>0)))
 
Upvote 0
This appears to have solved my problem! You're a magician, and a very timely one at that. Very much appreciated Jonmo1.
 
Upvote 0

Forum statistics

Threads
1,226,875
Messages
6,193,455
Members
453,801
Latest member
777nycole

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