Returning 6 columns of data from a second table from one key lookup.

Brboland

New Member
Joined
Nov 19, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows
I have two tables. One is my data table where I want to retrieve certain columns based on my first table where I will enter one field to lookup. This will be a table of roughly 300 rows. The table where I want to pull the data from is roughly 9K rows. What would be the best formula to use in this case? I have one workbook with two worksheets/tables.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Yes use Xlookup, it can return multiple columns.

If you need further help then please post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
You want the Filter function then in conjunction with the ChooseCols function
1709838388335.png

=CHOOSECOLS(FILTER($A$3:$F$33,$A$3:$A$33=H4,"-"),1,2,3)
 
Upvote 0
Why use choosecols to return the 1st 3 columns? when you can just use
Excel Formula:
=FILTER($A$3:$C$33,$A$3:$A$33=H4,"-")
 
Upvote 0
It's an example. We have not heard if the columns are consecutive or if they need to be pulled in a certain order
 
Upvote 0
Yes use Xlookup, it can return multiple columns.

If you need further help then please post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Here are images of the sheets in question. Sheet one is where I want to enter one field to lookup and populate column B - G. Second sheet is my data where I want to get information from. I'm trying to retrieve columns B, E, M, Q, AH, AK
1709839780774.png
1709839831396.png
 
Upvote 0
As you are putting that into a table, you cannot use spill ranges, so you will need to use xlookup in each column to retrieve the data you want.
Are you happy to convert the table with the formula into a normal range?

Als0 the project Id column has nothing that resembles your lookup value of 20211
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top