简体   繁体   English

EXCEL VLOOKUP-从一个公式中提取多个列

[英]EXCEL VLOOKUP - Extracting multiple columns from one formula

I'm trying to use a VLOOKUP array formula to extract and display multiple columns using one formula. 我正在尝试使用VLOOKUP数组公式来使用一个公式提取和显示多列。

Excel Formula: Excel公式:

=VLOOKUP(A15,A1:G9,{3,4,5},FALSE) = VLOOKUP(A15,A1:G9,{3,4,5},FALSE)

  1                      2             3          4        5          6
Transaction ID      Payment Date    Product    Quantity   Cost       Sales 
MVLN195             1/3/2014        Trash Can   1         $14.00     $14.00 
XFYR246             1/4/2014        Lawnmower   1         $599.00    $599.00    
DWDF167             1/4/2014        Diapers     1         $29.00     $29.00 
YNBM339             1/5/2014        Sweater     3         $59.00     $177.00    
WTKQ758             1/7/2014        Bike        1         $599.00    $599.00
SFKS527             1/7/2014        Radio       1         $25.00     $25.00 
OGWT288             1/8/2014        Bike        1         $599.00    $599.00    
TCQN516             1/9/2014        Calender    5         $3.00      $15.00

  1        2         3         4        
ID       Product   Quantity   Cost
OGWT288  Bike      #N/A       #N/A

I've tried using the array vlookup formula, but only column 3 comes up. 我试过使用数组vlookup公式,但是只有第3列出现。 I've tried to press ctrl shift enter as well but still only data from column is pulled not for the other two. 我试图按ctrl shift输入,但仍然只从列中的数据不拉其他两个。

If anyone could be of any assistance would be very helpful. 如果有人可以提供任何帮助,将非常有帮助。

Thank You 谢谢

Put this in the first cell and drag over: 将其放在第一个单元格中并拖动:

=VLOOKUP($A$15,$A$1:$G$9,COLUMN(C:C),FALSE)

在此处输入图片说明

If you really want to array enter then you can use your formula: 如果您确实想对enter进行数组化,则可以使用公式:

  1. Select B15:D15 with B15 active. 选择B15:D15,同时激活B15。
  2. Enter the formula in the formula bar. 在公式栏中输入公式。
  3. Hit Ctrl-Shift-Enter to array enter the formula into all three cells at same time. 按Ctrl-Shift-Enter可以将公式同时输入到所有三个单元格中。

在此处输入图片说明

First of all your formula is correct. 首先,您的公式是正确的。

Put it in the first column, in your scenario it's A16. 将其放在第一列中,在您的情况下为A16。

And then select that cell and drag it upto the next 3 cells. 然后选择该单元格并将其拖动到接下来的3个单元格中。

Move your mouse cursor to the top formula bar and click over, and press ctrl+shift+enter 将鼠标光标移至顶部的公式栏,然后单击鼠标,然后按ctrl + shift + enter

It should work. 它应该工作。

Thanks 谢谢

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

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