[英]how to make a cell populate data from another sheet based on dropdown selection
I've looked and didn't get an example that works for my situation. 我已经看过,但没有找到适合我的情况的示例。
I am making a pricing calculator and need to have pricing populate in cells once I've selected the device from a dropdown. 我正在制作价格计算器,并且从下拉列表中选择设备后,需要在单元格中填充价格。
I've created the source data in Sheet2 Column A is Device Column B is MSRP and Column C is Discounted price 我在Sheet2中创建了源数据,列A是设备列B是MSRP,列C是折价
On Sheet 1 I want to select a device in cell B4 (already have that dropdown created) and have it automatically populate the MSRP in C4 and the Discounted price in D4. 在工作表1上,我想在单元格B4中选择一个设备(已经创建了该下拉列表),并让它自动填充C4中的MSRP和D4中的折扣价。
I'm not very familiar with how to use Vlookup and IFERROR and the other answers I've seen didn't explain how the formulas worked enough for me to adapt those to my situation. 我对如何使用Vlookup和IFERROR不太熟悉,而我看到的其他答案并没有说明公式如何足以使我适应我的情况。
Any help is appreciated, thank you! 任何帮助表示赞赏,谢谢!
Something like: 就像是:
=IFERROR(VLOOKUP (B4,'Sheet2'!A$1:C$200,2,FALSE)),"-") = IFERROR(VLOOKUP(B4,'Sheet2'!A $ 1:C $ 200,2,FALSE)),“-”)
In C4 in sheet 1 will return the value from column 2 on the range A:C in sheet 2 (ie column B). 在工作表1的C4中,将返回工作表2中A:C范围(即B列)中第2列的值。 Change the 2 to 3 in D4 to get the value from column C in sheet 2. The FALSE forces excel to match the values exactly rather than just picking the first likely match it finds. 将D4中的2更改为3,以从工作表2的C列中获取值。FALSE力精于精确匹配值,而不仅仅是选择它找到的第一个匹配项。 If it can't find the value IFERROR returns -. 如果找不到该值,则IFERROR返回-。 You can change C$200 to cover the full range of whatever is in your list in sheet 2. 您可以将200加元更改为覆盖工作表2列表中所有内容的全部范围。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.