Can I use VBA function to return a (dynamic) list of acceptable values into Excel's data validation?

后端 未结 6 1541
夕颜
夕颜 2020-12-19 11:28

For a given cell, I select Data/Validation and set Allow to \"List\". I now wish to set Source like so:

=rNames(REGS)

but that does not work (name not found

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 12:12

    Sounds like your rNames function is probably returning a 1-dimensional array (which will be treated as a row).
    Try making your function return a column as a 1-based 2-dimensional array (Ansa(1,1) then Ansa(2,1) etc)

提交回复
热议问题