AutoFilter Criteria Using Array (Error) - Too Large String?

后端 未结 2 1551
温柔的废话
温柔的废话 2020-12-21 01:57

Update: Through some additional testing I discovered: 1) 255 Characters does seem to be the breaking point (character limit). Setting the filter wi

相关标签:
2条回答
  • 2020-12-21 02:35

    A co-worker of mine helped me resolve the issue.

    Apparently when using this syntax:

    Criteria1:=sArr
    

    Excel reads the array as one long string instead of looking at it as an array that contains many string elements.

    The fix is to use the Array() function like so:

    Criteria1:=Array(sArr)
    

    This seems to prevent Excel from corrupting.

    0 讨论(0)
  • 2020-12-21 02:47

    Sorting before autofilter will help you to perform autofilter function faster and better

    0 讨论(0)
提交回复
热议问题