INDEX and MATCH for a complicated search function

sgreenprice

New Member
Joined
Sep 21, 2017
Messages
6
Good Afternoon,

I have a problem in which I need to create a dynamic list depending on a search criteria, which then looks at a column of data and returns all values adjacent to the matching search criteria. I've appended an image to hopefully make my query a little clearer.

I know I need to use INDEX and MATCHIF functions, and possibly VLOOKUP? But honestly I'm at odds with how I will use those functions to achieve what I need.

Do you guys have any suggestions? Thanks in advance!

qt13Qlz.jpg


Kind Regards,
Stephen
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Re: INDEX and MATCH help please for a complicated search function

See if this example helps


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
1
Search​
1010-1​
Loop Id​
2
100​
1010-1​
100​
103​
104​
200​
205​
616​
1124​
3
103​
1010-2​
400​
406​
500​
502​
506​
4
104​
1010-3​
1​
2​
4​
5​
6​
1606​
5
200​
6
205​
7
616​
8
1124​
9

<tbody>
</tbody>


Array formula in B2 copied down
=IFERROR(INDEX(INDEX($E$2:$Z$100,MATCH($B$1,$D$2:$D$100,0),0),SMALL(IF(ISNUMBER(INDEX($E$2:$Z$100,MATCH($B$1,$D$2:$D$100,0),0)),COLUMN($E$1:$Z$1)-COLUMN($E$1)+1),ROWS(B$2:B2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

Adjust the ranges to suit

M.
 
Last edited:
Upvote 0
Re: INDEX and MATCH help please for a complicated search function

Thanks so much for the prompt reply. This works an absolute treat - perfect!
 
Upvote 0
Re: INDEX and MATCH help please for a complicated search function

You are welcome. Thanks for the feedback.

M.
 
Upvote 0
Re: INDEX and MATCH help please for a complicated search function

Cross posted https://www.excelforum.com/excel-ge...-complicated-search-function.html#post4989785

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Re: INDEX and MATCH help please for a complicated search function

Cross posted https://www.excelforum.com/excel-ge...-complicated-search-function.html#post4989785

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Understood, like I said in the other forum I didn't know what cross-posting even until today was but I'll keep the rule in mind for next time!
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,841
Members
449,051
Latest member
excelquestion515

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