Perform a find on hidden cells

前端 未结 2 1270
你的背包
你的背包 2021-02-19 14:03

I have a computed range of values in a hidden column which I use for a dropdown box. To figure out which value the user has selected, I try to run a Find on that range, but for

相关标签:
2条回答
  • 2021-02-19 14:12

    According to Andy Pope (and he's never wrong) Find only works on hidden cells if you're using xlFormulas. Perhaps a Match instead?

    Set inserted = Cells(Application.WorksheetFunction.Match("SelectedEvent", Range("RDS_Event_IDs"), 0), Range("RDS_Event_IDs").Column)
    
    0 讨论(0)
  • 2021-02-19 14:34

    Is really necesary do it inside a macro, would be easier use match:

    =MATCH(G9;H9:H16;0)
    

    G9 : Cell of the DropDownBox

    H9:H16 : Your range

    0 : for exact match

    It returns the index inside the array

    0 讨论(0)
提交回复
热议问题