Return several values to one cell which match criteria and date range

questionss

New Member
Joined
Jul 15, 2014
Messages
2
Hello.

I have two tables with similar information. File A is the raw, and File B with selected items. Is it possible to return all code under title “DEF” from File A in the way ”A112, A144, A134, A136, A452, A584, A714, A848, A980, A988” to file B cell B3 with title name(A3) and date range (G3:H3)?

I tried this:
=INDEX('[FILE A.xls]Sheet 1'!$B$1:$B$48002,MATCH($H3,IF('[FILE A.xls]Sheet 1'!$A$1:$A$48002=$A3,'[FILE A.xls]Sheet 1'!$D$1:$D$48002),0))

But it can only return the first code that match the starting date. I am using excel 2010, please give me some advice.

Thanks so much.

File A
[TABLE="width: 355"]
<tbody>[TR]
[TD]TITLE[/TD]
[TD]CODE[/TD]
[TD] DURATION [/TD]
[TD] DATE[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]C123[/TD]
[TD="align: right"]0:39:00[/TD]
[TD="align: right"]1/4/2010[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A112[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/1999[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A144[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2000[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A134[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2001[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A136[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2002[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A452[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2003[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A584[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2004[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A714[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2005[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A848[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2006[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A980[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2007[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]A988[/TD]
[TD="align: right"]1:15:00[/TD]
[TD="align: right"]10/1/2008[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD]B124[/TD]
[TD="align: right"]1:00:00[/TD]
[TD="align: right"]3/3/1980[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD]B346[/TD]
[TD="align: right"]0:58:30[/TD]
[TD="align: right"]3/4/1980[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD]B547[/TD]
[TD="align: right"]1:02:00[/TD]
[TD="align: right"]3/5/1980[/TD]
[/TR]
</tbody>[/TABLE]


File B
[TABLE="width: 598"]
<tbody>[TR]
[TD]Title[/TD]
[TD]Code[/TD]
[TD]Type[/TD]
[TD]Format[/TD]
[TD] Quantity[/TD]
[TD] Duration [/TD]
[TD] Staring Date[/TD]
[TD] End Date[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD][/TD]
[TD] A[/TD]
[TD] A[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0:39:00[/TD]
[TD="align: right"]1/4/2010[/TD]
[TD="align: right"]1/4/2010[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD][/TD]
[TD] B[/TD]
[TD] A[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]12:30:00[/TD]
[TD="align: right"]10/1/1999[/TD]
[TD="align: right"]9/10/2008[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD][/TD]
[TD] C[/TD]
[TD] A[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3:00:30[/TD]
[TD="align: right"]3/3/1980[/TD]
[TD="align: right"]3/5/1980[/TD]
[/TR]
</tbody>[/TABLE]
 

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