Countifs with 900 different criteria!!!

RUMPOLE

New Member
Joined
Oct 4, 2017
Messages
25
Can anyone suggest a way I can do this?

I get up to about 120 criteria before excel tells me that the formula is too big.

Any suggestions of methods I could use to expand it to 900 (I know this sounds excessive)?

Kind Regards.
 
That was just an observation, irrelevant to the solution.

But perhaps some of those columns could be fruitfully combined. For example, instead of having separate columns for grass, clay, hard, and carpet, you could have one column for surface type.

Thanks for the suggestion shg.

I did consider his, but using a binary approach to the task, I believe I would need separate columns for each?

I was unsure how to go about solving the task with multiple possible selections in the one field, such as in the example you suggested above of having grass, clay, hard, and carpet combined in one field.

Kind Regards.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
1=grass, 2=clay, ...

Any other mutually-exclusive columns might be likewise combined.
 
Last edited:
Upvote 0
You could also look at Advanced Filter: http://www.contextures.com/xladvfilter01.html

MyFilters: =B2:H3
MyData: =B7:H15
C5: =SUBTOTAL(3,B8:B15)

Before:


Book1
BCDEFGH
2MyField1MyField2MyField3MyField4MyField5MyField6
3010100
4
5COUNT8
6
7IDMyField1MyField2MyField3MyField4MyField5MyField6
8a101101
9b010100
10c011000
11d101101
12e010100
13fOther01011
14g2Other0101
15h22Other010
Sheet1


After:


Book1
BCDEFGH
2MyField1MyField2MyField3MyField4MyField5MyField6
3010100
4
5COUNT2
6
7IDMyField1MyField2MyField3MyField4MyField5MyField6
9b010100
12e010100
Sheet1
 
Last edited:
Upvote 0
Can anyone suggest a way I can do this?

I get up to about 120 criteria before excel tells me that the formula is too big.

Any suggestions of methods I could use to expand it to 900 (I know this sounds excessive)?

Kind Regards.
I am curious about this problem since I have a sketch of a solution in mind; would you please post a sample data set (post as an image of the Excel spreadsheet), so I can test my solution to make sure it's right?
 
Upvote 0
I am curious about this problem since I have a sketch of a solution in mind; would you please post a sample data set (post as an image of the Excel spreadsheet), so I can test my solution to make sure it's right?

Hi

I'm having trouble creating a URL which it asks for to post the sample data, I'll post it once I've worked it out- it doesnt allow the option of browsing through the directory and then selecting unfortunately, as that is what i know how to do!

Kind Regards
 
Upvote 0
uMhykDZ
uMhykDZ
I am curious about this problem since I have a sketch of a solution in mind; would you please post a sample data set (post as an image of the Excel spreadsheet), so I can test my solution to make sure it's right?

I've tried uploading an excel image via URL- unsure if it will work

edit- it hasn't worked- is it possible I don't have permission to post an image?
 
Last edited:
Upvote 0
You could also look at Advanced Filter: http://www.contextures.com/xladvfilter01.html

MyFilters: =B2:H3
MyData: =B7:H15
C5: =SUBTOTAL(3,B8:B15)

Before:

BCDEFGH
2MyField1MyField2MyField3MyField4MyField5MyField6
3010100
4
5COUNT8
6
7IDMyField1MyField2MyField3MyField4MyField5MyField6
8a101101
9b010100
10c011000
11d101101
12e010100
13fOther01011
14g2Other0101
15h22Other010

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>




After:

BCDEFGH
2MyField1MyField2MyField3MyField4MyField5MyField6
3010100
4
5COUNT2
6
7IDMyField1MyField2MyField3MyField4MyField5MyField6
9b010100
12e010100

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Thank you very much, I will check out the advanced filters link.

Did you automate the step to get to the filtered 'after' screenshot in the example above? if so, could you suggest a way i could replicate the automation?!

Thanks and Kind Regards again.
 
Upvote 0
Did you automate the step to get to the filtered 'after' screenshot in the example above? if so, could you suggest a way i could replicate the automation?!

I didn't in this case, but it's easily done from VBA.

The macro recorder will get you started. As usual, the code generated will be a little bit flabby, but is easily modified once you've got the basic syntax.
 
Upvote 0

Forum statistics

Threads
1,215,941
Messages
6,127,785
Members
449,407
Latest member
KLL_VA

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