Index experts needed

churmie

New Member
Joined
Jan 9, 2014
Messages
44
Hi

I am trying to build a spreadsheet that will produce several results based on referencing one value in one particular cell.

How do I build a formula that will produce the results like in Match? Leaving blanks if the incorrect Animal I input in Lookup?

Any help will be HUGELY appreciated!

The example is below:

Lookup: Fox

Animal Name Colour Origin Owner
Match: Fox Dave Red US No
Fox Harry Red Italy No


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]ANIMAL[/TD]
[TD]NAME[/TD]
[TD]COLOUR[/TD]
[TD]ORIGIN[/TD]
[TD]OWNER[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Fox[/TD]
[TD]Dave[/TD]
[TD]Red[/TD]
[TD]US[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Rabbit[/TD]
[TD]Steve[/TD]
[TD]Grey[/TD]
[TD]Italy[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Rabbit[/TD]
[TD]John[/TD]
[TD]Black[/TD]
[TD]Germany[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Dog[/TD]
[TD]Chris[/TD]
[TD]White[/TD]
[TD]UK[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Cat[/TD]
[TD]Brian[/TD]
[TD]Ginger[/TD]
[TD]UK[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Fox[/TD]
[TD]Harry[/TD]
[TD]Red[/TD]
[TD]Italy[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Dog[/TD]
[TD]Derek[/TD]
[TD]Red[/TD]
[TD]Denmark[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Cat[/TD]
[TD]Kane[/TD]
[TD]Red[/TD]
[TD]France[/TD]
[TD]No[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Excel 2010
ABCDE
1ANIMALNAMECOLOURORIGINOWNER
2FoxDaveRedUSNo
3RabbitSteveGreyItalyYes
4RabbitJohnBlackGermanyYes
5DogChrisWhiteUKYes
6CatBrianGingerUKYes
7FoxHarryRedItalyNo
8DogDerekRedDenmarkYes
9CatKaneRedFranceNo
10
11
12
13Lookupfox
14ANIMALNAMECOLOURORIGINOWNER
15FoxDaveRedUSNo
16FoxHarryRedItalyNo
17     
18     
19     
20     
Sheet5
Cell Formulas
RangeFormula
A15{=IF(ROWS(A$15:A15)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(A$2:A$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(A$15:A15))))}
A16{=IF(ROWS(A$15:A16)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(A$2:A$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(A$15:A16))))}
A17{=IF(ROWS(A$15:A17)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(A$2:A$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(A$15:A17))))}
A18{=IF(ROWS(A$15:A18)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(A$2:A$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(A$15:A18))))}
A19{=IF(ROWS(A$15:A19)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(A$2:A$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(A$15:A19))))}
A20{=IF(ROWS(A$15:A20)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(A$2:A$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(A$15:A20))))}
B15{=IF(ROWS(B$15:B15)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(B$2:B$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(B$15:B15))))}
B16{=IF(ROWS(B$15:B16)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(B$2:B$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(B$15:B16))))}
B17{=IF(ROWS(B$15:B17)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(B$2:B$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(B$15:B17))))}
B18{=IF(ROWS(B$15:B18)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(B$2:B$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(B$15:B18))))}
B19{=IF(ROWS(B$15:B19)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(B$2:B$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(B$15:B19))))}
B20{=IF(ROWS(B$15:B20)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(B$2:B$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(B$15:B20))))}
C15{=IF(ROWS(C$15:C15)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(C$2:C$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(C$15:C15))))}
C16{=IF(ROWS(C$15:C16)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(C$2:C$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(C$15:C16))))}
C17{=IF(ROWS(C$15:C17)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(C$2:C$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(C$15:C17))))}
C18{=IF(ROWS(C$15:C18)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(C$2:C$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(C$15:C18))))}
C19{=IF(ROWS(C$15:C19)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(C$2:C$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(C$15:C19))))}
C20{=IF(ROWS(C$15:C20)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(C$2:C$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(C$15:C20))))}
D15{=IF(ROWS(D$15:D15)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(D$2:D$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(D$15:D15))))}
D16{=IF(ROWS(D$15:D16)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(D$2:D$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(D$15:D16))))}
D17{=IF(ROWS(D$15:D17)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(D$2:D$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(D$15:D17))))}
D18{=IF(ROWS(D$15:D18)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(D$2:D$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(D$15:D18))))}
D19{=IF(ROWS(D$15:D19)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(D$2:D$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(D$15:D19))))}
D20{=IF(ROWS(D$15:D20)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(D$2:D$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(D$15:D20))))}
E15{=IF(ROWS(E$15:E15)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(E$2:E$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(E$15:E15))))}
E16{=IF(ROWS(E$15:E16)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(E$2:E$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(E$15:E16))))}
E17{=IF(ROWS(E$15:E17)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(E$2:E$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(E$15:E17))))}
E18{=IF(ROWS(E$15:E18)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(E$2:E$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(E$15:E18))))}
E19{=IF(ROWS(E$15:E19)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(E$2:E$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(E$15:E19))))}
E20{=IF(ROWS(E$15:E20)>COUNTIF($A$2:$A$9,$B$13),"",INDEX(E$2:E$9,SMALL(IF($A$2:$A$9=$B$13,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(E$15:E20))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks Scott. I have put all the cells in the order you have, but all cells keep returning a blank? I remember of course to Ctrl+Shift+Return at the end, but it's just blank?
 
Upvote 0
Ignore me! I think my workbook wasn't formatted correctly. Working just as you put it. Brilliant work, really appreciated Scott
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

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