在儲存格 F1 到 F100000 與 S1 到 S100000 的範圍,清除含有 1234
的所有儲存格內容
-------------------------------1. Sub Remove_PII()
2. Dim myRange As Range
3. Dim myCell As Range
4. Set myRange = Range("F1:F100000,S1:S100000")
5. For Each myCell In myRange
6. If myCell Like "*1234*" Or _
7. myCell Like "*otherword*" Then
8. myCell.ClearContents
9. End If
10. Next myCell
11. End Sub
-------------------------------