Hi,


How to interlink two columns in a excel using excel macros?


Following are the steps describing the requirements of my small project:


step 1: Column 1 has values entered through a text box and a command button using userform through VBA
step 2: I have combo box in which the entered values are populated from excel(Column 1)


Now,
step 3: On selecting the value from the drop down, i should enter the value in the another text box and click on command button, to add the entered value in the Column 2 which is linked to the value selected from drop down.
step 4: I should be able to add multiple values (one at a time) to the Column 2 which has dependency with the single value selected from drop down(i should add multiple values for the single value selected from drop down)
step 5: I should again retrieve the value from column 2 to another combo box.


I completed step 1 and step 2.
Can you help me to achieve step 3,4 and 5 using Excel Macros VBA

For eg:
1. I add country names through textbox1 to Column1 of excel
2. I display combobox1 with added country names
3. I select any country name from combobox1 and add the State names through textbox2 to Column2 of excel
4. I again display the combobox2 with country names and on selecting the country name, i should display state names in combobox3 from Column2 of excel

Thanks in Advance