Forum Discussion

velvetkloud's avatar
velvetkloud
Copper Contributor
Jul 24, 2024

Automatically select drop down list option based on value of other cell

Hi all

 

I have a column with cells that are populated from a drop down list. I would like one of the list options to be populated auotmatically based on the value of another cell but I am not sure if this is possible.

I would usually use an IF formula for this but can't with a drop down list as the cells are restricted to the list options so no formla can be added to them. Is there another way to do it?

Thank you

  • velvetkloud 

    That would require VBA code, so it would work only in the desktop version of Excel for Mac and Windows, and users would have to allow macros.

    Is that OK with you? If so, please provide more specific information.

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    velvetkloud 

    Attached is an example in the inserted file with VBA. Maybe that will help you.

    The file is an old VBA example that I got from the internet, but I don't remember where. The author of the file would like to forgive me.

     

    Otherwise, look at the possibilities with one of the lookup formulas. As an example in data validation, the formula could look like this =IFERROR(VLOOKUP(B1, A2:B4, 2, FALSE), "").

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

Resources