+ Reply to Thread
Results 1 to 10 of 10

Vba in auto change the dropdown list from my selection ?

  1. #1
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Vba in auto change the dropdown list from my selection ?

    Hi,

    i have an excel file with me with 2 drop down list, currently i would like to use VBA to change the drop down list to such that user will not see all of the drop down list based on the selection they have make

    currently is my example excel file that i have highlight and instruction on what to do and be seems, can anyone expert here help me out
    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Vba in auto change the dropdown list from my selection ?

    Click in 'A2' - combobox appears - select then appropriate selections appear in combobox in 'B2'
    This is all contained within the table confines - to expand type a single character in 'A3' - click to 'B3' and back to 'A3' - your table has expanded ready to repeat selections.
    There are no on-sheet formula nor data validation nor formatting everything is contained in the worksheet code module.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Vba in auto change the dropdown list from my selection ?

    Hi i just download ur file however i dont see any drop down appear when i select A2

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Vba in auto change the dropdown list from my selection ?

    I changed the order of your asset category...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Vba in auto change the dropdown list from my selection ?

    Quote Originally Posted by sintek View Post
    I changed the order of your asset category...
    Please Login or Register  to view this content.
    tested it work perfectly

    what this mean ?
    xlBetween, Formula1:="=Sheet2!E" & Rw & ":E" & Rw + 2 & ""
    and
    Rw = IIf(Indx < 8, 2, 5)

    this is row and cell with 8, 2, 5 ?

    sorry i need to apply this to my main where the row and sheet maybe different

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Vba in auto change the dropdown list from my selection ?

    Check the position of the selected value in the Asset Category List
    Please Login or Register  to view this content.
    Check start row on Method of Disposal List for other dropdown data row 2 or row 5
    Please Login or Register  to view this content.
    Populates other dropdown with list i.e. E2:E4 OR E5:E7
    Please Login or Register  to view this content.
    Thanks for rep +
    Last edited by sintek; 04-26-2023 at 06:03 AM.

  7. #7
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Vba in auto change the dropdown list from my selection ?

    Quote Originally Posted by sintek View Post
    Check the position of the selected value in the Asset Category List
    Please Login or Register  to view this content.
    Check start row on Method of Disposal List for other dropdown data row 2 or row 5
    Please Login or Register  to view this content.
    Populates other dropdown with list i.e. E2:E4 OR E5:E7
    Please Login or Register  to view this content.
    Thanks for rep +
    Sir i need ur help to add on if i want my Column C to be back to E2:E7 in a dropdown when i delete my Column A value how can i do it ?

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Vba in auto change the dropdown list from my selection ?

    Firstly...No need to quote entire posts...It just clutters the thread...

    Replace this...

    Please Login or Register  to view this content.
    With...
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Vba in auto change the dropdown list from my selection ?

    Thank you sir, it work as what i wan
    as i wan If I choose 3G, 4A, 4B, 4C, 4H, 4K, 4P, I will only be able to see Sale (Default), Dumping/Destruction, Donation to Charity

    is there a way where in above statement i can see "Sale (Default) selected in my drop down list on column C ?

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Vba in auto change the dropdown list from my selection ?

    is there a way where in above statement i can see "Sale (Default) selected in my drop down list on column C ?
    Answered in other thread here

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto Populating Date based on dropdown selection
    By johnrochie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2020, 10:14 AM
  2. Auto-selection of listbox items using a dropdown menu
    By terriertrip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2020, 04:00 PM
  3. Replies: 4
    Last Post: 07-06-2017, 10:19 AM
  4. Cull dropdown list options based on selection in another dropdown
    By Kiffar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2012, 01:53 AM
  5. Auto-locking a Dropdown Selection
    By csm088 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-12-2011, 05:06 PM
  6. Auto-populate fields based on selection from dropdown?
    By Aswert in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-20-2009, 03:26 PM
  7. Auto entry depending on dropdown selection
    By breal33 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-29-2008, 07:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1