简体   繁体   English

从Excel中的表格动态设置单元格值

[英]Dynamically set cell values from table in Excel

I've got an excel document that essentially looks like this (imagine it having around 15 000 rows): 我有一个基本上像这样的excel文档(想象一下它有大约15000行):

A    B    C    D    E    F
---------------------------
Art  Price    Art  Price
---------------------------
A    1         A    5
A    3         B    10
A    4         C    8
B    7         
B    2
C    3
C    15

As you can see the prices in column B are inconsistent. 如您所见,B列中的价格不一致。

What I want to do is to set the prices (in column B) to the correct prices (that are found in column E) based on the articles name (found in column A and D). 我要做的是根据商品名称(在A和D列中)将价格(在B列中)设置为正确的价格(在E列中找到)。

Unfortunately I'm at loss when it comes to VBA in Excel, and formulas in Excel, what would be a smart way to approach (or solve) this? 不幸的是,当我谈到Excel中的VBA和Excel中的公式时,我无所适从,什么是解决(或解决)此问题的明智方法?

Thank you in advance! 先感谢您!

Try the VLOOKUP excel formula in the excel help, no coding needed. 尝试在excel帮助中尝试VLOOKUP excel公式,无需编码。

Enter =VLOOKUP(A2;$D$2:$E$4;2) in cell B2 and fill down. 在单元格B2输入=VLOOKUP(A2;$D$2:$E$4;2)并填写。

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

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