简体   繁体   English

使用数组作为标准最大大小的自动过滤

[英]Autofilter using array as criteria max size

So this is kinda a weird one but: 所以这有点奇怪,但是:

I have an excel sheet with a few hundred thousand rows of customer data. 我有一个带有数十万行客户数据的Excel工作表。 I have a sheet with 70,000 names and addresses to remove from the bigger sheet. 我有一个包含70,000个名称和地址的工作表,该工作表将从更大的工作表中删除。

What I've done before with VBA is combine the names and addresses into one column (on both sheets) and then I put all of the combination name+address cells into an array, then use the autofilter with the array of names + addresses. 我之前使用VBA所做的就是将名称和地址合并为一列(在两张纸上),然后将所有组合的名称+地址单元格放入一个数组中,然后对名称+地址数组使用autofilter that shows me all of relevant names + addresses. 向我显示所有相关的名称和地址。

However I've never had 70,000 rows to get rid of, and I've discovered that the max number of values you can use in filtering with an array is 65536. I imagine this has to do with the fact that 65536 is the biggest int you can have, and the largest number represented by 16 bits, etc... 但是,我从来没有要摆脱的70,000行,而且我发现可以在数组过滤中使用的最大值数量是65536。我想这与65536是最大的整数有关。您可以拥有,并且最大的数字由16位等表示...

does anyone know how I can use the autofilter with an array of values that is bigger than 65536? 有谁知道我如何将自动过滤器与大于65536的值数组一起使用?

An alternative solution is to add a new column in your customer data sheet with a countif(), counting how many times the address of the customer data exists in the address sheet. 一种替代解决方案是使用countif()在客户数据表中添加新列,计算该地址表中客户数据的地址存在多少次。 Then filter on the ones with 0 and delete those rows. 然后,筛选出0并删除那些行。 Sorry for not giving exactly the answer on your question, but this could be a way to go... 很抱歉没有给出您问题的确切答案,但这可能是一种解决方法...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM