• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

ComboBox dependable for another ComboBox in Userform

Hany ali

Active Member
hello my Masters
i want to help you to get data and List for ComboBox 2 ,when i choose any Country from ComboBox1
ComboBox1 ALL Country
ComboBox 2 all cites for country list shown in ComboBox1
thanks alot
 

Attachments

  • 1.png
    1.png
    68.8 KB · Views: 9
  • Country.xlsm
    25.2 KB · Views: 8
thank you
I looked at this topic before, but I did not benefit from it. I have more data than the uploaded file, so this example does not work for me
 
See example.
I made tables of your cities lists, if you add new cities in the future the lists in combobox 2 are updated automatically.
 

Attachments

  • Country(belle).xlsm
    40.1 KB · Views: 8
thanks alot ...This is exactly required
but we haven't any way to answer without Name Manager ,becaouse my main file Contains more than 100 countries, this Way will be very stressful
if you can possibe to be by this way ,which i make it in file by Drop DownList ,but i want as i sent before in Userform .This is because I couldn't apply the same idea in the Userform
as you see i used this formula to make List for Cities whwn i choose any country in Data Validation
Code:
=OFFSET(INDEX(Sheet2!$M$3:$Y$30,,MATCH($D$9,Sheet2!$M$2:$Y$2,0)),,,COUNTA(INDEX(Sheet2!$M$3:$Y$30,,MATCH($D$9,Sheet2!$M$2:$Y$2,0)),1))
 

Attachments

  • 1.png
    1.png
    5.2 KB · Views: 1
  • Country.xlsm
    33.9 KB · Views: 6
Last edited:
Yes,this is possible
Example for Egypt
Code:
ComboBox2.RowSource = Range("M3:M" & Cells(Rows.Count, "M").End(xlUp).Row).Address
 
Back
Top