发布网友
共1个回答
热心网友
Private Sub CommandButton2_Click()
For i = 1 To [A65536].End(xlUp).Row
Cells.Find(What:=TextBox1.Text, After:=ActiveCell).Activate
ActiveCell.Offset(0, 5).Activate
If ActiveCell.FormulaR1C1 = TextBox2.Text Then Exit For
ActiveCell.FormulaR1C1 = TextBox2.Text
Next
End Sub