![](/img/trans.png)
[英]Excel formula to compare the 2 columns and extract the value from another column
[英]Compare a single row with a column and extract the value from another column on the same row in Excel
所以我正在尋找一個公式或類似這樣的東西:
我有4欄。 A B C D。
我有一列(A),其中包含多個可以重復的值。
A1: A A2: A A3: B A4: C A5: C
我想將每一行與具有每個值之一的列(B)進行比較。 因此B1 = A,B2 = B,依此類推。
但是,我要提取到列“ D”的值在列“ C”中。 因此,如果A1等於列B中的任何值,我想將同一行中列C中的值提取到列D中。
因此,在D1中,我需要C1中的值。 在D2中,我也需要C1中的值。 但是在D3中,我想要C2中的值。
這似乎可行:
=VLOOKUP(A1:A5,B1:C5,2,0)
使用Ctrl + Shift + Enter在D1:D5中輸入為數組公式 。
結果:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.