简体   繁体   English

根据Activex组合框中的选定值如何使用vlook up

[英]based on the selected value in the Activex combobox how to use vlook up

根据Activex组合框中的选定值,如何在特定工作表中使用vlookup并在另一工作表中显示该数据。

use the LinkedCell property and type the address in there. 使用LinkedCell属性并在其中输入地址。 If you want that value in the other spreadsheet you can use a simple worksheet formula = to get that done. 如果要在其他电子表格中使用该值,则可以使用简单的工作表公式=来完成该工作。

Add a script in VBA for the combobox when it changes like this: 更改时,在VBA中为组合框添加脚本,如下所示:

Private Sub ComboBox1_Change()
    Range("YOURCELL").Value2 = ComboBox1.Value
End Sub

Then cell "YOURCELL" will contain the value of the combobox whenever its value changes. 然后,只要“ YOURCELL”单元格的值发生更改,它就会包含该组合框的值。 If you reference that "YOURCELL" cell in your vlookup you are there! 如果您在vlookup中引用“ YOURCELL”单元格,那么您就在那里!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM