Excel VBA How to detect if something was pasted in a Worksheet

后端 未结 2 1487
我寻月下人不归
我寻月下人不归 2020-11-27 22:41

I\'ll start by saying that my experience with Excel and VBA is limited to what I saw in school. I have programming experience, but in other languages.

I have a file

2条回答
  •  盖世英雄少女心
    2020-11-27 22:50

    Worksheet_Change event will do the job if you add a formula into cell which will never be overwritten. Let's say your data are pasted into A1 cell and occupied 5 columns. So, enter below formula into 6. column and row 1.

    =COUNTBLANK(A1:A1048576)
    

    Now, you're able to handle/detect paste event ;)

提交回复
热议问题