Hi Guys,
I want to match the name in combobox1 with column E if it's matched ,then subtract Total summing of column F from Total summing of column G which is relating the client . and show the final result in textbox1. for instance client KHALID TOTAL for column F=120+120 ,TOTAL for column G=110 , the result in textbox1= 240-110 =130.
should sum any values for the client for each column F,G and subtract between two columns . last thing should be show as numberformat ="#,##0.00" in textbox1
Private Sub ComboBox1_Change()
Me.TextBox1.Value = WorksheetFunction.SumIf(sheet2.Range("E:E"), ComboBox1.Value, sheet2.Range("F:F") - WorksheetFunction.SumIf(sheet2.Range("E:E"), ComboBox1.Value, sheet2.Range("G:G")))
End Sub
thanks