it's not vlookup so do I need index?

steviewonderpants

New Member
Joined
Oct 2, 2006
Messages
48
Hello,

I have two tabs of data that I am using to consolidate data to create a fax template, using 1 tab for the fax, and the second to hold reference data.

Essentially I want to type my fax recipient in column B3, and use this "lookup code" to reference my DATA tab and pull in multiple sets of data.

If I were to use VLOOKUP, I know the formula would be =VLOOKUP($B$3,DATA!$A$1:$G$49,1,FALSE), however the issue I have is that it only returns the very first instance where B3 is found in column A of the data tab. What formula do I need to type in place of the VLOOKUP to pull in all instances of where B3 matches something in column A of the data tab.

Many thanks
SD
 

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.
Your formula:

=VLOOKUP($B$3,DATA!$A$1:$G$49,1,FALSE), Returns what's in your Sheet Data Column A
=VLOOKUP($B$3,DATA!$A$1:$G$49,2,FALSE), Returns what's in your Sheet Data Column B
=VLOOKUP($B$3,DATA!$A$1:$G$49,3,FALSE), Returns what's in your Sheet Data Column C
=VLOOKUP($B$3,DATA!$A$1:$G$49,4,FALSE), Returns what's in your Sheet Data Column D
and so on....
 
Upvote 0
I think this is what you want. This is an array formula, so you will need to execute it with CTRL+SHIFT+ENTER and you can drag it down a bunch of rows (as many as you need to satisify the maximum results you'd expect).

Excel 2010
BC
2Output Criteria:Results:
3Test_2Result_T2.1
4Result_T2.2
5Result_T2.3
6Result_T2.4
7

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
C3{=IF(ROWS(DATA!B$2:B2)>COUNTIF(DATA!$A$1:$A$8,OutputCriteria),"",INDEX(DATA!$B$1:$B$8,SMALL(IF(ISNUMBER(SEARCH($B$3,DATA!$A$1:$A$8)),ROW(DATA!$B$1:$B$8)),ROWS(DATA!B$2:B2)),1))}
C4{=IF(ROWS(DATA!B$2:B3)>COUNTIF(DATA!$A$1:$A$8,OutputCriteria),"",INDEX(DATA!$B$1:$B$8,SMALL(IF(ISNUMBER(SEARCH($B$3,DATA!$A$1:$A$8)),ROW(DATA!$B$1:$B$8)),ROWS(DATA!B$2:B3)),1))}
C5{=IF(ROWS(DATA!B$2:B4)>COUNTIF(DATA!$A$1:$A$8,OutputCriteria),"",INDEX(DATA!$B$1:$B$8,SMALL(IF(ISNUMBER(SEARCH($B$3,DATA!$A$1:$A$8)),ROW(DATA!$B$1:$B$8)),ROWS(DATA!B$2:B4)),1))}
C6{=IF(ROWS(DATA!B$2:B5)>COUNTIF(DATA!$A$1:$A$8,OutputCriteria),"",INDEX(DATA!$B$1:$B$8,SMALL(IF(ISNUMBER(SEARCH($B$3,DATA!$A$1:$A$8)),ROW(DATA!$B$1:$B$8)),ROWS(DATA!B$2:B5)),1))}
C7{=IF(ROWS(DATA!B$2:B6)>COUNTIF(DATA!$A$1:$A$8,OutputCriteria),"",INDEX(DATA!$B$1:$B$8,SMALL(IF(ISNUMBER(SEARCH($B$3,DATA!$A$1:$A$8)),ROW(DATA!$B$1:$B$8)),ROWS(DATA!B$2:B6)),1))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Workbook Defined Names
NameRefers To
OutputCriteria=Sheet1!$B$3

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>




Excel 2010
AB
1LookupResult
2Test_1Result_T1.1
3Test_2Result_T2.1
4Test_3Result_T3.1
5Test_2Result_T2.2
6Test_2Result_T2.3
7Test_2Result_T2.4
8Test_1Result_T1.2

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
DATA
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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