Hi guys i am running a userform with 2 combobox and 1 textbox for a data set
Data eg.
A w 100
b x 105
C y 120
D z 162

I want the first combobox to choose from A to D and return the corresponding values
(Choose "B" and get "x" and "105")
or
i can choose w to z in the second combobox and return ("C" and "120")

The thing is my vba code allow me to run the first but not the second part.

I also want to update the number value using the textbox in the userform.
How do i go abt doing that? adding or subtracting the change in value in Textbox1 to the ("Inventory database")?

My code currently look like this

Private Sub ComboBox1_Change()
Dim Row As Integer
'To select item for change

For Row = 2 To 500
If ComboBox1.Value = Sheets("Inventory database").Cells(Row, 1) Then
ComboBox2.Value = Sheets("Inventory database").Cells(Row, 2)
TextBox1.Value = Sheets("Inventory database").Cells(Row, 3)

If ComboBox2.Value = Sheets("Inventory database").Cells(Row, 2) And ComboBox2.Value <> ComboBox1.Value Then
ComboBox1.Value = Sheets("Inventory database").Cells(Row, 1)
TextBox1.Value = Sheets("Inventory database").Cells(Row, 3)

End If
Next
End Sub