Extracting data from table with mismatched rows and columns

Tdw1990

New Member
Joined
Jul 20, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm trying to figure out how I can extract data from a table that has multiple parent rows and then lists values on a separate row and column. For example, I want to return the value of Total Occupied % that corresponds to 10000-Laurete RE Investors,LP,Houston. I'm sure there is a similar post about this, I just cant think of what the formulas are called. Any help is appreciated

OccupancySummary07_20_2021.xlsx
BCDEFGHIJ
3 Lease Type # of Units Total Rentable Total Rent/ Occupied Total Rent/ Occupied 6 Month
4 Rent Area Rentable Area Occupied % RollOver
5 Area Area
610000 - Laureate RE Investors, LP,Houston
7N/A15.000.0018,084.000.000.000.000.000.00
8Office Net43.00301,832.07132,453.002.28132,355.002.2899.939,473.00
9Total58.00301,832.07150,537.002.01132,355.002.2887.929,473.00
10
1110343 - SH Crossing I LP,Houston
12N/A7.000.0087,932.000.000.000.000.000.00
13Office Net7.0099,228.8171,243.001.3971,243.001.39100.000.00
14Total14.0099,228.81159,175.000.6271,243.001.3944.760.00
15
1610706 - Fuller Craighead, LLC,Houston
17Office Net1.009,000.0020,000.000.4520,000.000.45100.0020,000.00
18Total1.009,000.0020,000.000.4520,000.000.45100.0020,000.00
19
2011200 - Fuller Westchase Place,Houston
21N/A18.000.0079,318.000.000.000.000.000.00
22Office Net14.0087,056.2072,726.001.2072,726.001.20100.001,301.00
23Total32.0087,056.20152,044.000.5772,726.001.2047.831,301.00
24
2511205 - HMC Fuller Main Park, LLC,Houston
26N/A4.000.0041,080.000.000.000.000.000.00
27Office Net12.0057,562.6671,890.000.8071,890.000.80100.0011,873.00
28Total16.0057,562.66112,970.000.5171,890.000.8063.6411,873.00
29
301132 - Fuller Everman LP,Houston
31Office Net1.0026,352.000.000.000.000.000.00
32Total1.0026,352.000.000.000.000.000.000.00
33
3412654 - Fuller Goar, LLC,Houston
35N/A1.000.0089.000.000.000.000.000.00
36Office Net11.0028,036.9442,813.000.6542,813.000.65100.000.00
37Total12.0028,036.9442,902.000.6542,813.000.6599.790.00
38
3912705 - 12705 S Kirkwood (Fuller NWSW, LLC),Houston
40N/A1.000.001,990.000.000.000.000.000.00
41Office Net16.0041,260.2443,908.000.9443,908.000.94100.003,776.00
42Total17.0041,260.2445,898.000.9043,908.000.9495.663,776.00
43
441450 - HMC Fuller Westbelt, LLC,Houston
45N/A11.000.0024,315.000.000.000.000.000.00
46Office Net15.0047,139.0341,304.001.1441,139.001.1599.601,970.00
47Total26.0047,139.0365,619.000.7241,139.001.1562.691,970.00
Report1
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi TWD1990,

With your 365 version there are more options but my Excel 2016 approach would be:

TDW1990.xlsx
ABCDEFGHIJKLM
1
2
3 Lease Type # of Units Total Rentable Total Rent/ Occupied Total Rent/ Occupied 6 Month
4 Rent Area Rentable Area Occupied % RollOver
5 Area Area Lease TypeTotal
610000 - Laureate RE Investors, LP,Houston10000 - Laureate RE Investors, LP,Houston87.92
7N/A150180840000010343 - SH Crossing I LP,Houston44.76
8Office Net43301832.11324532.281323552.2899.93947310706 - Fuller Craighead, LLC,Houston100
9Total58301832.11505372.011323552.2887.92947311200 - Fuller Westchase Place,Houston47.83
1011205 - HMC Fuller Main Park, LLC,Houston63.64
1110343 - SH Crossing I LP,Houston1132 - Fuller Everman LP,Houston0
12N/A70879320000012654 - Fuller Goar, LLC,Houston99.79
13Office Net799228.81712431.39712431.39100012705 - 12705 S Kirkwood (Fuller NWSW, LLC),Houston95.66
14Total1499228.811591750.62712431.3944.7601450 - HMC Fuller Westbelt, LLC,Houston62.69
15  
1610706 - Fuller Craighead, LLC,Houston  
17Office Net19000200000.45200000.4510020000  
18Total19000200000.45200000.4510020000  
19  
2011200 - Fuller Westchase Place,Houston  
21N/A1807931800000  
22Office Net1487056.2727261.2727261.21001301  
23Total3287056.21520440.57727261.247.831301  
24  
2511205 - HMC Fuller Main Park, LLC,Houston  
26N/A404108000000  
27Office Net1257562.66718900.8718900.810011873  
28Total1657562.661129700.51718900.863.6411873  
29  
301132 - Fuller Everman LP,Houston  
31Office Net12635200000  
32Total126352000000  
33  
3412654 - Fuller Goar, LLC,Houston  
35N/A108900000  
36Office Net1128036.94428130.65428130.651000  
37Total1228036.94429020.65428130.6599.790  
38  
3912705 - 12705 S Kirkwood (Fuller NWSW, LLC),Houston  
40N/A10199000000  
41Office Net1641260.24439080.94439080.941003776  
42Total1741260.24458980.9439080.9495.663776  
43  
441450 - HMC Fuller Westbelt, LLC,Houston  
45N/A1102431500000  
46Office Net1547139.03413041.14411391.1599.61970  
47Total2647139.03656190.72411391.1562.691970  
Sheet1
Cell Formulas
RangeFormula
L6:L47L6=IFERROR(INDEX($B$6:$B$9999,AGGREGATE(15,6,ROW($B$6:$B$9999)-ROW($B$5)/(($B$6:$B$9999<>"")*($C$6:$C$9999="")),ROW()-ROW($L$5))),"")
M6:M47M6=IFERROR(INDEX($I$6:$I$9999,AGGREGATE(15,6,ROW($B$6:$B$9999)-ROW($B$5)/(($B$6:$B$9999="Total")),ROW()-ROW($L$5))),"")
 
Upvote 0
Hi TWD1990,

With your 365 version there are more options but my Excel 2016 approach would be:

TDW1990.xlsx
ABCDEFGHIJKLM
1
2
3 Lease Type # of Units Total Rentable Total Rent/ Occupied Total Rent/ Occupied 6 Month
4 Rent Area Rentable Area Occupied % RollOver
5 Area Area Lease TypeTotal
610000 - Laureate RE Investors, LP,Houston10000 - Laureate RE Investors, LP,Houston87.92
7N/A150180840000010343 - SH Crossing I LP,Houston44.76
8Office Net43301832.11324532.281323552.2899.93947310706 - Fuller Craighead, LLC,Houston100
9Total58301832.11505372.011323552.2887.92947311200 - Fuller Westchase Place,Houston47.83
1011205 - HMC Fuller Main Park, LLC,Houston63.64
1110343 - SH Crossing I LP,Houston1132 - Fuller Everman LP,Houston0
12N/A70879320000012654 - Fuller Goar, LLC,Houston99.79
13Office Net799228.81712431.39712431.39100012705 - 12705 S Kirkwood (Fuller NWSW, LLC),Houston95.66
14Total1499228.811591750.62712431.3944.7601450 - HMC Fuller Westbelt, LLC,Houston62.69
15  
1610706 - Fuller Craighead, LLC,Houston  
17Office Net19000200000.45200000.4510020000  
18Total19000200000.45200000.4510020000  
19  
2011200 - Fuller Westchase Place,Houston  
21N/A1807931800000  
22Office Net1487056.2727261.2727261.21001301  
23Total3287056.21520440.57727261.247.831301  
24  
2511205 - HMC Fuller Main Park, LLC,Houston  
26N/A404108000000  
27Office Net1257562.66718900.8718900.810011873  
28Total1657562.661129700.51718900.863.6411873  
29  
301132 - Fuller Everman LP,Houston  
31Office Net12635200000  
32Total126352000000  
33  
3412654 - Fuller Goar, LLC,Houston  
35N/A108900000  
36Office Net1128036.94428130.65428130.651000  
37Total1228036.94429020.65428130.6599.790  
38  
3912705 - 12705 S Kirkwood (Fuller NWSW, LLC),Houston  
40N/A10199000000  
41Office Net1641260.24439080.94439080.941003776  
42Total1741260.24458980.9439080.9495.663776  
43  
441450 - HMC Fuller Westbelt, LLC,Houston  
45N/A1102431500000  
46Office Net1547139.03413041.14411391.1599.61970  
47Total2647139.03656190.72411391.1562.691970  
Sheet1
Cell Formulas
RangeFormula
L6:L47L6=IFERROR(INDEX($B$6:$B$9999,AGGREGATE(15,6,ROW($B$6:$B$9999)-ROW($B$5)/(($B$6:$B$9999<>"")*($C$6:$C$9999="")),ROW()-ROW($L$5))),"")
M6:M47M6=IFERROR(INDEX($I$6:$I$9999,AGGREGATE(15,6,ROW($B$6:$B$9999)-ROW($B$5)/(($B$6:$B$9999="Total")),ROW()-ROW($L$5))),"")
Can you explain what this function is doing? To me, it seems the aggregate function would be returning the n-th smallest value corresponding to "Total" in the Occupied % column
 
Upvote 0
I approached this a little differently and made it dynamic so that the lookup column could change.

NOTE: in order to do that I had to put the column names into one cell (which is really best practice) and deleted rows 2 & 3.

Solutions 20210719.003.xlsm
ABCDEFGHIJKLM
1 Lease Type # of Units Total Rent Rentable Area Total Rent/ Rentable Area Occupied AreaTotal Rent/ Occupied Area Occupied % 6 Month RollOver
210000 - Laureate RE Investors, LP,HoustonMaxNumRows5
3N/A1501808400000lkupRowTxt11200 - Fuller Westchase Place,Houston
4Office Net43301832.11324532.281323552.2899.939473lkupColTxt 6 Month RollOver
5Total58301832.11505372.011323552.2887.929473Result1301
6
710343 - SH Crossing I LP,Houston
8N/A708793200000
9Office Net799228.81712431.39712431.391000
10Total1499228.811591750.62712431.3944.760
11
1210706 - Fuller Craighead, LLC,Houston
13Office Net19000200000.45200000.4510020000
14Total19000200000.45200000.4510020000
15
1611200 - Fuller Westchase Place,Houston
17N/A1807931800000
18Office Net1487056.2727261.2727261.21001301
19Total3287056.21520440.57727261.247.831301
20
2111205 - HMC Fuller Main Park, LLC,Houston
22N/A404108000000
23Office Net1257562.66718900.8718900.810011873
24Total1657562.661129700.51718900.863.6411873
25
261132 - Fuller Everman LP,Houston
27Office Net12635200000
28Total126352000000
29
3012654 - Fuller Goar, LLC,Houston
31N/A108900000
32Office Net1128036.94428130.65428130.651000
33Total1228036.94429020.65428130.6599.790
34
3512705 - 12705 S Kirkwood (Fuller NWSW, LLC),Houston
36N/A10199000000
37Office Net1641260.24439080.94439080.941003776
38Total1741260.24458980.9439080.9495.663776
39
401450 - HMC Fuller Westbelt, LLC,Houston
41N/A1102431500000
42Office Net1547139.03413041.14411391.1599.61970
43Total2647139.03656190.72411391.1562.691970
Mismatched Rows Cols
Cell Formulas
RangeFormula
M5M5=INDEX($B$1:$J$43,MATCH(lkupRowTxt,$B$1:$B$43,0)+MATCH("Total",OFFSET(INDIRECT("B" & MATCH(lkupRowTxt,$B$1:$B$43,0)),1,0,MaxNumRows,1),0),MATCH(lkupColTxt,$B$1:$J$1,0))
Named Ranges
NameRefers ToCells
lkupColTxt='Mismatched Rows Cols'!$M$4M5
lkupRowTxt='Mismatched Rows Cols'!$M$3M5
MaxNumRows='Mismatched Rows Cols'!$M$2M5
 
Upvote 0
Can you explain what this function is doing? To me, it seems the aggregate function would be returning the n-th smallest value corresponding to "Total" in the Occupied % column

Your example was the first Lease Type so I assumed you may want to see all Lease Types and their Total under column I. If that's not the case then you can do a MATCH on the Lease Type to find its row (in this case row 6) then use AGGREGATE to find the first "Total" with a higher row number than the MATCH result.

My column L AGGREGATE is looking for the nth row number where column B isn't empty but column C is empty. The ROW()-ROW($L$5) is the k parameter which for row 6 returns a 1 so it looks for the 1st entry where that is true.
By the time we get to row 14 then ROW()-ROW($L$5) returns 9 so it looks for the 9th lowest row number where that's true, which is row 44 so it returns "1450 - HMC Fuller Westbelt, LLC,Houston".

The column M is the same formula but looking for "Total" so as long as all your data matches the example you supplied then the row 14 formula will find the 9th "Total" in row 47 and return 62.69.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,968
Messages
6,122,509
Members
449,089
Latest member
RandomExceller01

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