Return multiple values for a lookup

lracrft

New Member
Joined
Oct 30, 2017
Messages
9
I realize that this is a repeat of other posts that are out there but I have tried for hours to tweak the formula suggested in the other posts to fit my needs and still can't quite get there. I have a name in cell C3 (Sheet2) and I want to return all the values in column A of Sheet 1 where there is a match in column B of Sheet 1 to the name in Sheet2 cell C3. I want the resulting matches to appear in Sheet2 B13:B50 (this would eventually be an expanding range). The formula I have used is:

{=INDEX('Contact Log'!$A$2:$B$999,SMALL(IF('Contact Log'!$B$2:$B$99=$C$3,'Contact Log'!$A$2:$A$999),ROW('Client Summary'!$B$13:B13)),-1)}

When I get this to work I will add in the IF(ISERROR portion to return blanks if there are no more results, but I just know I need to get the base formula to work first. Can anyone help with this?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Book1
AB
21a
32b
43a
54b
65a
76b
Contact Log



Book1
BC
3a
4
5
6
7
8
9
10
11
12
131
143
155
Client Summary
Cell Formulas
RangeFormula
B13{=IFERROR(INDEX('Contact Log'!$A$2:$A$999,SMALL(IF('Contact Log'!$B$2:$B$999=$C$3,ROW('Contact Log'!$B$2:$B$999)-ROW('Contact Log'!$B$2)+1),ROWS('Client Summary'!$B$13:$B13))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0
In the value of true of the IF formula you need to use ROW to get a series of number starting at 1 you need to then subtract the starting row and then add one. For the K value in the small you need to use ROWS. The IF logical test had different dimensions from your array form INDEX.. The Array used in index does not need both columns you can only include column A and then you do not need to specify the column argument.
Code:
=IF(ROWS('Client Summary'!$B$13:B13)>COUNTIF('Contact Log'!$B$2:$B$999,'Client Summary'!$C$3),"",INDEX('Contact Log'!$A$2:$A$999,SMALL(IF('Contact Log'!$B$2:$B$999=$C$3,ROW('Contact Log'!$A$2:$A$999)-ROW('Contact Log'!$A$2)+1),ROWS('Client Summary'!$B$13:B13))))
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

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