我们可以用VBA吗?
如果A列上的文字=“学生”,B栏上的文字=“John”,则将B文本替换为“John Paul”。
谢谢。
答案 0 :(得分:-1)
回答我的问题。适合我:
Sub ChangeJohn()
Dim x As Integer
Dim i As Integer
x = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To x
If Range("A" & i).Value = "Student" Then
If Range("B" & i).Value = "John" Then
Range("B" & i).Value = "John Paul"
End If
End If
Next i
End Sub