INDEX and MATCH was fine...but

ArbieBrown

New Member
Joined
Oct 19, 2017
Messages
5
Long time lurker - now needing help!

Basically I have the following formula:

=INDEX('Data Drop'!$A$1:$N$1000,MATCH($B2,'Data Drop'!$B1:$B1000,0),0)

Which is very good at looking up the requisite information and bringing it back (I have a bunch of them on a sheet which then matches column B's data with the indexed info, to collect the correct output)

It all works great - and is a massive timesaver on a repetitive report.

Or at least it would be

Until I realised that some of the data in Col B now should/could match multiple results.

I cannot for the life of me work out how to convert this effective formula into one that can return multiple results and still work...

Any help - or even some pointers - would be gratefully received!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
This shows how to return more then one record with index.

https://youtu.be/SCiqQiC7Bwk


Thanks Scott, but that returns Max values from multiple records - not close to what I'm trying to do which is to return the cell(s) that corresponds to multiple records which means that I capture the information for all the duplicates.

Interesting though - bound to have a use for Max values at some stage!
 
Upvote 0
Just adjust the formula to meet your criteria. something like this. I assume you are copying across if you are going down then change the columns to rows
Code:
=IF(COLUMNS($A2:A2)>COUNTIF('Data Drop'!$B$2:$B$8,$B2),"",INDEX('Data Drop'!$A$2:$A$8,SMALL(IF(Sheet4!$B2='Data Drop'!$B$2:$B$8,ROW('Data Drop'!$B$2:$B$8)-ROW('Data Drop'!$B$2)+1),COLUMNS($A2:A2))))
 
Upvote 0
I can not download files at work. Like the formula in the video this is an array formula and needs CONTROL+SHIFT+ENTER. I will try to take a look after work.
 
Upvote 0
Only if it is not too much trouble!

And yeah - I knew about CTRL+SHIFT+ENTER - it's not that.

Really appreciate your attention.
 
Upvote 0
Listing the values in column B and using it to lookup data is not the best way to do this since you may or may not have duplicates. I think the best way to do this is to have a helper column in your Data Drop sheet that you use to pull the data. So in Data Drop you add a helper column that looks up the name based on column B and then in your other sheet do your Index pulling based on the helper column Or maybe use VBA.
 
Upvote 0
Given all the effort that you made I re evaluated what I was doing and used helper columns to push some of the calculations elsewhere to be then used in the appropriate space.

Works great - but I wouldn't have gotten there without your help!

Many thanks
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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