Hello,
I try to subtract amount in textbox2 from column C for each name is matched with combopbox1 . when select name from combobox1 and populate amount in textbox1 and I will write amount with formatting "#,##0.00" then should search for name in column B and subtract amount from column C .
this is what I have so far
Private Sub CommandButton1_Click()
Dim TTot As Double
Dim M As Range
With Worksheets("CS")
Set M = .Columns(2).Find(ComboBox1.Value, , xlValues, xlWhole)
If Not M Is Nothing Then
TTot = TextBox2.Value
M.Offset(, 1).Text = M.Offset(, 1).Text - TTot
End If
End With
End Sub
it will show error object required in this line
M.Offset(, 1).Text = M.Offset(, 1).Text - TTot
appreciated for any help.