excel formula to return multiple results

jmazorra

Well-known Member
Joined
Mar 19, 2011
Messages
715
Hello everyone:

I am currently using Index,Match to match records from one sheet to the other. Works great, except when I have multiple records with the same identifier. Let me explain:

The sheet named Open Leave Report contains the raw data (lookup values), while the sheet named Open Leave Capture contains the scrubbed data. So my formula looks like this
Code:
=INDEX('Open Leave Report'!O:O,MATCH('Open Leave Capture'!C9,'Open Leave Report'!B:B,0))

Works great, except when I have the following:

Code:
[TABLE="width: 284"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Employee ID[/TD]
[TD]Continuous or Intermittent[/TD]
[/TR]
[TR]
[TD]1646484        [/TD]
[TD]Intermittent[/TD]
[/TR]
[TR]
[TD]1646484        [/TD]
[TD]Continuous[/TD]
[/TR]
</tbody>[/TABLE]

So when I type the Employee ID in the Open Leave Capture it always brings back the first row, but it ignores the second record. It looks like this:
Code:
[TABLE="width: 182"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Employee ID[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]1646484[/TD]
[TD]Intermittent[/TD]
[/TR]
[TR]
[TD]1646484[/TD]
[TD]Intermittent[/TD]
[/TR]
</tbody>[/TABLE]


Is there any way I can format my Index/Match formula to bring back both records?

I hope I explained this well
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try;

=IFERROR(INDEX(Sheet1!$B:$B,SMALL(IF((Sheet1!$A:$A=$A2),ROW($A:$A)),ROW()-1)),"")

It's an array formula so Ctrl+Shift+Enter after paste ;)
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,432
Members
452,326
Latest member
johnshaji

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