How can I use VBA to ignore green triangle error in range without looping cell by cell?

前端 未结 5 675
后悔当初
后悔当初 2021-01-02 20:30

I have some large data sets that I am automating and distributing. I want to eliminate the little green triangles that warn the user about numbers stored as text. I have use

5条回答
  •  天命终不由人
    2021-01-02 20:58

    The obvious answer (Range(...).Errors(3).Ignore = True) doesn't seem to work when the Range is larger than a single cell.

    After a bit of experimentation, I found that you can manually select the range of cells and click the little pop-up menu that appears and tell it to ignore all errors in the range, but this doesn't appear to have a VBA equivalent.

    Doing this experiment with the macro recorder on records nothing, which is usually a sign that the programmer at Microsoft who implemented this functionality was incompetent.

    Sadly, I think this means that there is no solution other than looping.

    Related

提交回复
热议问题