如何使值依赖于 Excel 上的下拉列表/菜单?
我最近建立了一个电子表格,其中包含许多不同类型的电缆(控制、电源、通信)及其尺寸和导体。我已经有了一堆技术数据,并用它创建了一个非常简单的下拉菜单,您可以在其中选择电缆的类型。
我想做的是有一个“价格”栏,该栏会根据所选电缆的类型而变化。该下拉菜单位于电子表格的顶部;因此,当类型发生变化时,所有电缆的所有价格都会发生变化。
另外,如果有人知道是否可以在每种电缆尺寸具有不同因素的情况下完成此操作,那就太好了(即 3 根导线的电缆的价格将乘以 3,9 根导线的电缆的价格乘以 9,依此类推)。
希望任何人都可以帮助我!
I recently set up a spreadsheet that has many different types of electrical cables (control, power, communication) and their sizes and conductors. I already have a bunch of technical data and with it I created a very simple drop down menu where you can select the type of electrical cable.
What I'm trying to do is having a "price" column that would change depending on the type of cable selected. This drop down menu is at the top of the spreadsheet; therefore when the type changes, all prices change for all the cables.
Also if someone knows if this can be done while having different factors for each cable size that would be great (i.e. a cable of 3 conductors would have the price multiplied by 3, a cable of 9 conductors by 9 and so on).
Hope anyone can help me with this!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建一个组合框(在开发人员功能区下)。从那里右键单击它并选择“格式控制”。输入范围=您的电缆列表。我假设您有一份包含价格和技术方面的电缆列表,请在列表前插入一列并填写 1 到 x(x 是最后一行数据,稍后将使用它)。然后,您可以输入“单元格链接”的单元格引用。这将返回下拉列表返回的行。然后,您可以对 1 到 x 上的“单元链路”结果进行 vlookup,以仅返回该电缆的数据。这有点复杂,但如果需要的话我可以发送一个模型。
You can create a combo box (under the Developer ribbon). From there right mouse click on it and select "format control". Input range = your list of electrical cables. I am assuming you have a list of Cables with Price and the technical aspects, insert a column before your list and fill in with 1 through x (x being the last row of data, will use this later on) . You then put in a cell reference for the "cell link". This returns which row the drop down is returning. You then can do a vlookup up of the "cell link" result on the 1 through x to return just that Cable's data. this is somewhat complex, but I can send a mock up if necessary.