我有以下代码。它循环遍历A列中的每个单元格并进行替换。现在,我在Z列的同一行有一个单元格。使用下面的代码,如何在列A中的单元格中替换Z列中同一行的单元格?
因此,如果A15
的文字为“ HI,TESTING ”,而Z15
的文字为“ TESTING ”,则会有替换所以A15
会变成“ HI,”
For Each a In .Range(.Range("A1"), .Range("A1").End(xlDown))
Set regEx = CreateObject("vbscript.regexp")
regEx.Pattern = "[^\u0000-\u007F]"
a = Replace(a, ".", "")
a = Replace(a, ",", "")
a = Replace(a, "!", "")
a = Replace(a, "|", "")
a = Replace(a, ":", "")
a = Replace(a, ";", "")
a = Replace(a, "&", "")
a = regEx.Replace(a, "")
a = "#poltawards " & a
Next