Find value in one column and return value from same row but different column in another tab

Vickie Hartley

New Member
Joined
Aug 19, 2015
Messages
13
I work for a non-profit community housing agency and created a workbook that has multiple tabs. One of the tabs is a spreadsheet that contains 22 columns (scope assumptions). On another tab I want to pull data from this large spreadsheet. There are usually at least a 100 rows, each room in a house has multiple lines and tasks with sub-totals by room. The spreadsheets primary purpose is to communicate to the construction crew what needs to be done in each room and what the budget is. Here is an example of the primary spreadsheet.

LocationTaskDescriptionLabor HoursLabor CostsMaterialsSubsOH,G&A, ProfitContract Amount
Front PorchDemolitionDemo garbage, existing windows, steps3905060200
Front PorchElectricalProperly install wire mold at outlet close to ceiling and exterior light16571236
Sub-Total9050165131436
Living RoomElectricalFurnish and install new light switch and cover plate502171
Living RoomDoors & WindowsFurnish and install new trim and windows (3)8300300257857
Sub-Total830030050278928
*******ElectricalFurnish and install new 240V outlet for range and 120V outlet for fridge500214714
*******Plumbing******* sink - Furnish and install new PVC drain, vent and pex supply lines with shut off valves and all sundries for complete install10504501500
Sub-Total00015506642214

<tbody>
</tbody>

A second, third and fourth spreadsheet is needed to communicate to the sub-contractors what needs to be done. One spreadsheet each for Electrical, Plumbing, and HVAC. Ideally I want to create formulas that will look for every occurrence of a given task (i.e. "Electrical") in column B from the primary spreadsheet and return the corresponding location, description, and cost for each occurrence. For example:

Electrical Scope
LocationDescriptionBudget
Front PorchProperly install wire mold at outlet close to ceiling and exterior light236
Living RoomFurnish and install new light switch and cover plate71
*******Furnish and install new 240V outlet for range and 120V outlet for fridge714

<tbody>
</tbody>


Can you please give me some guidance and/or answers?

I often use Mr. Excel to solve my Excel problems by looking for similar problems or using the books I have purchased but this time, I could not find a solution so I posted my first request for help. I have been using this site for about 3 years.

I have tried a multitude of nested formulas (search, if, lookup, index, etc) to get this to work.
 
I have not had any luck determining what is driving the error.

Here is my formula.
=IF('Original scope assumptions'!$AE$37="Electrical",IF(ROWS(A$2:A2)<='Original scope assumptions'!$AF$37,INDEX(INDIRECT(A$1),SMALL(IF(Task='Original scope assumptions'!$AE$37,ROW(Task)-ROW('Original scope assumptions'!$B$37)+1),ROWS(A$2:A2))),""),"")

First, did you enter the Formula with the keyboard combination Ctrl+Shift+Enter?
When you just hit Enter you get the #VALUE! error.

Second, make sure your headers match. The headers from the table on the "Original scope assumptions" sheet should be the same on the "Electrical" sheet otherwise you get the #REF! error.

Wrong: Just Enter


Correct: Ctrl+Shift+Enter
 
Last edited:
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I had a look at the workbook. Some problems I noticed so others can perhaps benefit from it:

First, You must enter the formula with the keyboard combination Ctrl+Shift+Enter. Not just Enter. This is essential otherwise the formula won't work.

Second, The lookup table starts in row 35 with the headers. So I adjusted a cell reference from $B$37 to $B$36 where the actual data starts.

=IF('Original scope assumptions'!$AE$37="Electrical",IF(ROWS(A$2:A2)<='Original scope assumptions'!$AF$37,INDEX(INDIRECT(A$1),SMALL(IF(Task='Original scope assumptions'!$AE$37,ROW(Task)-ROW('Original scope assumptions'!$B$36)+1),ROWS(A$2:A2))),""),"")

Third, The Location Column (Column A) contained just 1 row with the location. That is why it couldn't find the location because it was referring to a blank row.

Fourth and last, I couldn't find the Budget column so I put there the _1_Roof_Contract_Amount column.

Excel is very picky with names. You have to spell them exactly the same.
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,094
Latest member
bsb1122

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