Posts by akbarnikain

    Re: Select unique items and sort in combo boxes


    Quote from akbarnikain;792441

    I am trying to select unique items and sort from named ranges to display in my combo boxes on a userform.
    I can display the unique items however, I am unable to sort the unique items without changing their original respective rows.


    Please refer to the attached file


    Thank you Krishnakumar it was a big help.
    However, there is one issue...The "date" ComboBox9, Column "I", sorts first "dd" then "mm" and finally the "yyyy"
    Hope you have a solution
    Thanks

    Re: vba code for index match


    Not sure if you received my last email...I am sending it again.


    Sorry to bother you...when Adding ("CommandButton2") a new Category ("combobox3"), new Item/Price ("TextBox3/4") it writes to the last empty row of the "whole table" rather than the first empty row for that new ("Category") column heading...Can you help?
    Thanks

    Re: vba code for index match


    Sorry to bother you...when Adding ("CommandButton2") a new Category ("combobox3"), new Item/Price ("TextBox3/4") it writes to the last empty row of the "whole table" rather than the first empty row for that new ("Category") column heading...also the same when adding new "items" to existing "categories". Can you help?
    Thanks

    Re: vba code for index match


    Thank you very much.


    I would appreciate your help for the "Add Category" (CommandButton1) and "Add Items" (CommandButton2) to be able to add "dynamically" items to the respective columns based on the "Category" in "Column-A"
    This would include when I ADD a new "Category/Item/Rate".
    Thanks

    Category Fruits FruitsPrice Vegetables VegPrice Dairy DairyPrice


    Fruits Apple $1.25 Tomato $0.99 Butter $3.45
    FruitsPrice Grape $2.00 Potato $1.45 Cheese $4.75
    Vegetables Pears $1.75 Onion $1.10 Milk $3.55
    VegPrice Cucumber $0.75
    Dairy
    DairyPrice


    I have the above table and 2 combo boxes; representing criteria 1) for "Category" (ROWS) and 2) for the "Items" under those categories (COLUMNS) and based on the 2 criteria in the ComboBoxes I would like to display the price in a TextBox using INDEX and MATCH if possible .
    My vba code for the "textbox1" is:




    The above code obviously does not work
    Can someone help me with the vba code. Thanks


    The rest of my code is:


    When I execute the ADD button I get an error message:


    run-time error '-2147417848 (80010108)':method 'add' of object 'listrows' failed


    However, if I remove the "ListBox2" it works fine.


    Any help would be appreciated.
    ****************************************************************