Return multiple values from a column based on multiple lookup values

Ritvars_R

New Member
Joined
Nov 19, 2018
Messages
3
Hi,

I have a list of look up values

Client A
Client B
Client C
Client D

I want to create a formula which would look up Client A, Client B, Client C, ... values in a range and return any corresponding values to these lookup values. The formula works if I try to look up only A value in a range and return the corresponding values, but I don't know how to add more lookup values to this formula. Please see the example formula below.

=IF(ISERROR(INDEX(Sheet7!$A$1:$C$1996,SMALL(IF(Sheet7!$A$1:$A$1996='Monday test'!$E$3&'Monday test'!$E$4,ROW(Sheet7!$A$1:$A$1996)),ROW(Sheet7!1:1)),2)),"",INDEX(Sheet7!$A$1:$G$1996,SMALL(IF(Sheet7!$A$1:$A$1996='Monday test'!$E$3&'Monday test'!$E$4,ROW(Sheet7!$A$1:$A$1996)),ROW(Sheet7!1:1)),2))

Many thanks for your help in advance.

Ritvars
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
After reading quite a few threads on the forum, I realised I wasn't particularly clear on what I am trying to achieve, so I will try to explain the problem more clearly below.

I have a range of look up values in Sheet1:
[TABLE="width: 100"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[/TR]
[TR]
[TD]Client C[/TD]
[/TR]
[TR]
[TD]Client D[/TD]
[/TR]
</tbody>[/TABLE]

Then I have data in a table in Sheet2:

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]String4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client F[/TD]
[TD]String5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client C[/TD]
[TD]String6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client C[/TD]
[TD]String1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client C[/TD]
[TD]String3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String 4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

What I want to achieve is in Sheet1 to have a following list:

[TABLE="width: 200"]
<tbody>[TR]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String1[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String2[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String3[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]String4[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]String4[/TD]
[/TR]
[TR]
[TD]Client C[/TD]
[TD]String6[/TD]
[/TR]
[TR]
[TD]Client C[/TD]
[TD]String1[/TD]
[/TR]
[TR]
[TD]Client C[/TD]
[TD]String3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


This is the formula I'm currently playing with as to find a solution to this, but with little success so far.

Code:
[COLOR=#574123]=IF(ISERROR(INDEX(Sheet7!$A$1:$C$1996,SMALL(IF(Sheet7!$A$1:$A$1996='Monday test'!$E$3&'Monday test'!$E$4,ROW(Sheet7!$A$1:$A$1996)),ROW(Sheet7!1:1)),2)),"",INDEX(Sheet7!$A$1:$G$1996,SMALL(IF(Sheet7!$A$1:$A$1996='Monday test'!$E$3&'Monday test'!$E$4,ROW(Sheet7!$A$1:$A$1996)),ROW(Sheet7!1:1)),2))[/COLOR]

Thank you for your help in advance!
 
Upvote 0

Forum statistics

Threads
1,224,918
Messages
6,181,743
Members
453,064
Latest member
robatthe2A

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