Lookup Values across multiple tables

Falko26

Board Regular
Joined
Oct 13, 2021
Messages
89
Office Version
  1. 365
Platform
  1. Windows
All,

I'm trying to lookup and return the "Average: Total / Hr" value from a specific table based on the Crew Description.

Is there a way to do a type of lookup for that value?

I can VLOOKUP the crew description to get to the column I desire. Is there then a way to look down until first cell that says "Average:" and return the cell directly to the right of that or something?

1645123865463.png
 
Okay, I have taken a closer look at your sample workbook, and I see that there's an issue. It looks like each cell in Column E that contains the label "Average:" actually has a leading and trailing space. So the formula needs to be adjusted. Give me a moment, and I'll post the amended formulas, as per your sample workbook.
Thank you I appreciate all the help!
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Okay, the names should be defined as follows . . .

VBA Code:
Name:  BigNum
Refers to:  =MATCH(9.99999999999999E+307,'Labor Rates'!$F:$F)

Name:  TablesRange
Refers to:  ='Labor Rates'!$B$28:INDEX('Labor Rates'!$I:$I,'Labor Rates'!BigNum)

Then, the formula starting at D21, and copied down, should be as follows . . .

VBA Code:
=INDEX(TablesRange,SMALL(IF(LEFT(TRIM(INDEX(TablesRange,0,4)),7)="Average",IF(ROW(TablesRange)-MIN(ROW(TablesRange))+1>MATCH([@[CREW DESCRIPTION]],INDEX(TablesRange,0,1),0),ROW(TablesRange)-MIN(ROW(TablesRange))+1)),1),5)
 
Upvote 0
Solution
Well that was incredible. Thank you so much for all of that! I never would have gotten that one to work. My knowledge of Excel isn't quite to that level.

Thanks again! We might chat soon on my next problem with this workbook ;)
 
Upvote 0
You're very welcome, I'm glad I was able to help.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,215,756
Messages
6,126,690
Members
449,329
Latest member
tommyarra

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