Index Match Multiple Lines of Data based on changing Queries

Detonator12

New Member
Joined
Jul 16, 2009
Messages
17
Hello, i have modified a couple of formulas I found, but am struggling to make them dynamic enough without having to edit the formula when copy pasting.

All of this data below is reading from another sheet based on "JOB DESCRIPTION 1" field. Is there a way I can modify this formula below, to handle easier copy pasting without modifying the formula?

Cell C40 is the first job description in this example. When copy pasted i need to modify it, and also modify the ROWS(C$42:C42) parts of the formula.
Then its dragged down per column.

=IFERROR(IF(ROWS(C$42:C42)>COUNTIFS('Detailed Breakdown'!B:B,$C$40),"",INDEX('Detailed Breakdown'!$C$1:$C$9999,SMALL(IF('Detailed Breakdown'!$B:$B=$C$40,ROW('Detailed Breakdown'!$C$1:$C$9999)-ROW('Detailed Breakdown'!$C$1)+1),ROWS(C$42:C42)))),"")

[TABLE="width: 804"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]JOB DESCRIPTION 1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Concrete pump[/TD]
[TD]5[/TD]
[TD]Day[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Supply and Install Reinforcement[/TD]
[TD]5[/TD]
[TD]t[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Form Work Install Rate[/TD]
[TD]5[/TD]
[TD]M2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Trench and Backfill: 300-600mm width to depth 1400mm Trench[/TD]
[TD]6[/TD]
[TD]m[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]JOB DESCRIPTION 2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Concrete Supply ONLY[/TD]
[TD]5[/TD]
[TD]M3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Form Work Install Rate[/TD]
[TD]5[/TD]
[TD]M2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Place and Compact Fill around Structures 750mm width[/TD]
[TD]5[/TD]
[TD]m3[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
You are having to modify the formula to accomodate for the job description because each description is of different length, correct? Or is there soem other reason?

Are all job Descriptions the same, eg: "Job Description" + increasing value?

Jon
 
Upvote 0

Forum statistics

Threads
1,224,832
Messages
6,181,231
Members
453,026
Latest member
cknader

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