View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
Saxman[_2_] Saxman[_2_] is offline
external usenet poster
 
Posts: 33
Default Vlookup & Concatenate?

On 29/07/2007 19:24:14, "Saxman" wrote:

The function at the start of this post does not appear to function
properly. The data (although returned) is incorrect and appears in one
cell, which makes copying difficult.


Sorry a correction. The function below is nearly there.

=IF(ISNA(VLOOKUP(A2,B$2:I$1501,2,0)),"",IF(ISERR(L EFT(A2,FIND("
",A2)-1)),A2,LEFT(A2,FIND(" ",A2)-1)) & " " & VLOOKUP(A2,B$2:I$1501,2,0) & ""
& VLOOKUP(A2,B$2:I$1501,3,0) & " " & VLOOKUP(A2,B$2:I$1501,4,0) & " "
&VLOOKUP(A2,B$2:I$1501,5,0) & " " & VLOOKUP(A2,B$2:I$1501,6,0)& " "
&VLOOKUP(A2,B$2:I$1501,7,0)& " " & VLOOKUP(A2,B$2:I$1501,8,0))

As an example I have the following data in these cells:-
A2 Solent
B236 SOLENT
C236 SOLENT (helper, parsed)
D236 22
E236 4
F236 3
G236 2
H236 35127
I236 69401
J236 D

K2 with your function returns (all in K2):-
Solent SOLENT22 4 3 2 35127 69401
The data in J236 is missing. The function needs tweaking to include this.

For some reason, from 14 runners, only three were returned in the K column
and yet all the horses match in both columns A and C exactly?