COUNTIFS closed workbook

jjcrazy

New Member
Joined
Nov 18, 2014
Messages
11
I'm trying to rewrite a COUNTIFS function so i can use it with an closed workbook, by using COUNT(IF(AND...

I want to count the number of data that has B3 in column AW, E2 in column AN and D3 in column AU. The following function works for that:

=COUNTIFS('data'!$AW:$AW;$B3;'data'!$AN:$AN;E$2;'data'!$AU:$AU;$D3)

Now I tried to rewrite it as follows, but this did not work:

=COUNT(IF(AND('data'!$AW$1:$AW$10000=$B3;'data'!$AN$1:$AN$10000=L$2;'data'!$AU$1:$AU$10000=$D3);1))

What did I do wrong here?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
AND doesn't work that way with arrays - it returns one result, not an array of results. You can use:

=SUMPRODUCT(('data'!$AW$1:$AW$10000=$B3)*('data'!$AN$1:$AN$10000=L$2)*('data'!$AU$1:$AU$10000=$D3))
 
Upvote 0
Yes - similar principle, just add the sum range to the end.
 
Upvote 0
Maybe you should consider a pivot table instead.
 
Upvote 0
i've actually made this to replace a pivot table, as i need the costs of deliveries to different zipcodes, but these can differ and i need to link something else to it. So i need everything to be in the same place every time..
 
Upvote 0
You lost me. Why not a pivot table and then use GETPIVOTDATA to return the data you need wherever you need it?
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

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