不用怕,有我在。 Sub x() For R = 1 To Cells(Rows.Count, 1).End(xlUp).Row Cells(R, 2).Replace what:="~#~#", replacement:=Cells(R, 1), lookat:=xlPart Next End Sub
其实不用 ~ 也可以,连 lookat:=xlPart 也可以不用,只是习惯罢。 Sub x() For R = 1 To Cells(Rows.Count, 1).End(xlUp).Row Cells(R, 2).Replace what:="##", replacement:=Cells(R, 1) Next End Sub