答案 0 :(得分:1)
作为简短的VBA解决方案,您可以使用:
Sub test()
With ActiveSheet
Dim ColAB As Variant, ColC As Variant, i As Long
ColAB = Intersect(.Columns("A:B"), .UsedRange).Value
ColC = Intersect(.Columns(3), .UsedRange).Value
For i = 1 To UBound(ColC, 1)
ColC(i, 1) = Trim(Replace(Replace(ColC(i, 1), ColAB(i, 1), ""), ColAB(i, 2), ""))
Next
.Range("C1:C" & UBound(ColC)).Value = ColC
End With
End Sub
但首先尝试使用副本(你无法撤消它)
仍然,=SUBSTITUTE(SUBSTITUTE(C2,A2,""),B2,"")
- 公式应该有用......如果没有,那么文本可能会有差异(并且无法找到搜索字符串)