Thread: Vlookup query
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Vlookup query

is there a way to show all of these say
with a comma between


To do it that way would require a VBA UDF.

How about returning each result to its own cell? That's fairly simple. For
example:

Horizontally:

....A1........B1........C1
result1...result2...result3

Vertically:

A1 = result1
A2 = result2
A3 = result3

--
Biff
Microsoft Excel MVP


"Lise" wrote in message
...
Sorry Biff I do have one more question - The below works perfectly -
however
I have now realised that there may be multiple matches, is there a way to
show all of these say with a comma between or am I asking for too much??
--
Thanks as always

Lise


"Lise" wrote:

Fabulous as always Biff - thanks so much.
--
Lise


"T. Valko" wrote:

=IF(COUNTIF(sheet2!$B$2:$B$576,B2),VLOOKUP(B2,she et2!$A$2:$K$511,1,0),0)

Your row ranges aren't the same size, 576 versus 511 ?

Try this...

=IF(COUNTIF(Sheet2!B$2:B$511,B2),INDEX(Sheet2!A$2: A$511,MATCH(B2,Sheet2!B$2:B$511,0)),0)

--
Biff
Microsoft Excel MVP


"Lise" wrote in message
...
Hello Everyone

I have two worksheets if the number in sheet 1 cell B2 is in column B
of
sheet 2 (say B36) I want the number in A36 to be copied to sheet one.

I have written the following but keep getting #N/A - What am I doing
wrong
please?

=IF(COUNTIF(sheet 2!$B$2:$B$576,B2),VLOOKUP(B2,sheet
2!$A$2:$K$511,1,0),0)
--
Thanks as always



.