Prima Satria
New Member
Hi,
I have 3 textboxes in number format. In texbox1 value = 11, textbox2 value = 5 and textbox 3 value = 11.
And I want to count how many number of 11 in a textbox4, every time the value in textbox1 is change or update.
Thanks in advance
I have 3 textboxes in number format. In texbox1 value = 11, textbox2 value = 5 and textbox 3 value = 11.
And I want to count how many number of 11 in a textbox4, every time the value in textbox1 is change or update.
Code:
Private Sub TextBox1_AfterUpdate()
On Error Resume Next
TextBox4.Value = Application.CountIf(TextBox1.Value, 11) + Application.CountIf(TextBox2.Value, 11) +Application.CountIf(TextBox3.Value, 11)
End Sub
Thanks in advance