简体   繁体   中英

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.

Excel Formula:

=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. I've tried to press ctrl shift enter as well but still only data from column is pulled not for the other two.

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:

  1. Select B15:D15 with B15 active.
  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.

在此处输入图片说明

First of all your formula is correct.

Put it in the first column, in your scenario it's A16.

And then select that cell and drag it upto the next 3 cells.

Move your mouse cursor to the top formula bar and click over, and press ctrl+shift+enter

It should work.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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