View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ragdyer
 
Posts: n/a
Default VLOOKUP show all results

Say the names are in Column A, from A1 to A1000.

Ages from B1 to B1000.

Enter the name you're looking to find into C1,
And enter this *array* formula in D1:

=IF(COUNTIF($A$1:$A$1000,$C$1)=ROWS($1:1),INDEX($ B$1:$B$1000,SMALL(IF($A$1:
$A$1000=$C$1,ROW($1:$1000)),ROW(1:1))),"")

--
Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of
the regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.

Now, copy this down enough rows so that you're sure that you have all the
possibilities returned.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"New_Man" wrote in message
...
hi people i am working on a database. i want to use the vlookup for

example..

Names age Vlookup john age
john 1 1
bill 2 4
pat 3 5
john 4 7
john 5
bill 6
john 7

I want all the john age to be displayed, my database is over a thousand
rows, so i was wonder if i can just select the whole entire row like B:B

and
it find all the ages for john only.. help plz and Thank you for your time

.....