1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. 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...

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

filter and sort excel column data with combo box

Discussion in 'VBA Macros' started by Babaand, Jun 18, 2017 at 12:11 PM.

  1. Babaand

    Babaand New Member

    Messages:
    15
    Dear sir,
    I have to create excel student database for my school. In this I have userform and other tools on it. for this database I have religion and cast category table and three different combo boxes for this information. I have to select firstly category, in second combo regligion and lastly cast alphabatically. Pls code for vba code
    I am sending u sample file
    Pls guide me
    Thank u in advanse


    ▬▬▬▬▬▬▬▬▬ Mod edit : thread moved to appropriate forum !

    Attached Files:

  2. vletm

    vletm Well-Known Member

    Messages:
    2,538
    Babaand ... hmmm
    Would You try to the first filter with those three parameters and
    after that sort with same three parameters ... or how?
  3. Babaand

    Babaand New Member

    Messages:
    15
    Dear sir,
    Thank you for answering...
    I have to filter firstly category, then out of category the religion will be selected.
    e.g. i have selected obc category with cbocat then Hindu and Muslim these two option should be displayed in religion combo box, at last if I selected Hindu religion then all categories from Hindu religion should be displayed in cbocast combo box alphabetically.

    Pls help

    Thanking you again
  4. vletm

    vletm Well-Known Member

    Messages:
    2,538
    Babaand ... like these steps in sheet?
    Screen Shot 2017-06-19 at 09.16.32.png Screen Shot 2017-06-19 at 09.16.57.png Screen Shot 2017-06-19 at 09.17.24.png
    Where do You need that UserForm?
    What will You do next?
  5. Babaand

    Babaand New Member

    Messages:
    15
    I have added userform in this file which will found in VBA
    Pls provide me VBA code also
  6. vletm

    vletm Well-Known Member

    Messages:
    2,538
    Babaand
    My keywords were:
    Where ...
    What ...
  7. Babaand

    Babaand New Member

    Messages:
    15
    Dear sir
    Thanks for your interest in answering...
    I have to filter the data like this screen shot. So I have inserted userform in vba console and I have to filter data with help of combo box for sutdent data Entry

    Pls guide with VBA code
    Thanking you

    Attached Files:

  8. vletm

    vletm Well-Known Member

    Messages:
    2,538
    Babaand
    ... checking
    ... my keywords?
    ... ideas?

    Attached Files:

  9. Babaand

    Babaand New Member

    Messages:
    15
    Very Good
    But the code works only one time
    at first start the code works but for next record or reopening of form it does not works
  10. vletm

    vletm Well-Known Member

    Messages:
    2,538
    Babaand
    I'm understanding the 1st line.
    It was midnight and I missed one part of the last code of selection.
    Now, even the casts selection will show the result.
    It is not 99% ready but it works as You wrote
    ... then You'll open the file!
    If You cannot tell more details ...
    It will be a challenge.

    Attached Files:

Share This Page