Extract specific tables from a set of large tables

aditya_7

New Member
Joined
Feb 13, 2016
Messages
5
Hello All,

I have a spreadsheet that looks like the below. This is a dummy sheet and the actual file I'm working on has large no. of data. My goal here is to be able to extract only the tables I specify on to a new excel. For eg: In a new excel file, I should only be required to type 'Comp B' and a formula should be able to return the table from B10 to G13. Manually copy pasting is not possible as there are lot of tables in sheet.

Comps.xlsx
ABCDEFG
1
2
3NameStart DateEMVBMVgrossnet
4Comp A06-01-200878,585.0071,278.006.255.25
5a17,359.0023,001.0032
6b24,204.0019,466.0098
7c24,897.0013,198.0032
8d12,125.0015,613.00109
9
10Comp B06-02-20082,24,523.002,35,008.0054
11p70,058.0055,578.0043
12q75,337.0099,719.0021
13r79,128.0079,711.0098
14
15Comp B06-03-20086,87,804.006,92,370.003.672.67
16x2,18,520.002,46,680.0021
17y2,21,401.002,15,591.0043
18z2,47,883.002,30,099.0054
Sheet1
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Please try this:

In my example cell K3 is the trigger cell. Name the Range CompTable

Book6.xlsm
BCDEFGHIJKLMNOPQ
3NameStart DateEMVBMVgrossnetComp A
4Comp A1/6/200878585712786.255.25NameStart DateEMVBMVgrossnet
5a173592300132Comp A3945378585712786.255.25
6b242041946698a0173592300132
7c248971319832b0242041946698
8d1212515613109c0248971319832
9d01212515613109
10Comp B2/6/200822452323500854
11p700585557843
12q753379971921
13r791287971198
14
15Comp C3/6/20086878046923703.66666672.6666667
16x21852024668021
17y22140121559143
18z24788323009954
Sheet3
Cell Formulas
RangeFormula
K5:P9K5=LET(One,MATCH(K$3,INDEX(CompTable,,1),0),TL,INDEX(CompTable,1,1),Two,MATCH(TRUE,ISBLANK(OFFSET(TL,One-1,0,100,1)),0),OFFSET(TL,One-1,0,Two-1,6))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
CompTable=Sheet3!$B$4:$G$24K5
 
Upvote 0
Solution
You will, of course, have to create a named range in your other workbook leading to the range with all those little tables. The formula should still work
 
Upvote 0
You're a genius! thanks!

If I understood correctly, you're using INDEX & MATCH function within the LET function. Can this be also done using a single XLOOKUP ? So basically instead of using INDEX & MATCH we use only XLOOKUP? I'm more familiar with XLOOKUP so would be easier to wrap my brain around all this
 
Upvote 0
You can use XLookup within the LET function. Any function you can dream of gets applied to the variable
 
Upvote 0
Yes sure, just one request. Can you please replace INDEX MATCH with XLOOKUP? I tried but couldn't do it
 
Upvote 0
Sorry, xlookup can only return a single cell or value. I thought you were asking for future uses of LET. Offset is another function that can return a range. Index is better because I used it to return a single column to help find the spaces. Match is used to find the Comp B and spaces.
 
Upvote 0

Forum statistics

Threads
1,215,132
Messages
6,123,227
Members
449,091
Latest member
jeremy_bp001

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