View Single Post
  #11   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 13:43:58, JLatham wrote:

=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))


Just to recap, using the function below,
=IF(ISERR(LEFT(A2,FIND(" ",A2)-1)),A2,LEFT(A2,FIND(" ",A2)-1))

This returns a single word or first word of a string of words. Works fine.

Column A has runners selected from a racecard (initialed in lower case)
copied from another worksheet in the same workbook (first words only).

Column B has a list of today's runners (in upper case).

Column C (helper) has the formula =IF(ISERR(LEFT(A2,FIND("
",A2)-1)),A2,LEFT(A2,FIND(" ",A2)-1)), and returns the first word in a string
of words from column B.

Columns D:J have all the corresponding data imported with column B.

So now we have two sets of identical data in columns A and C, (although the
text is in lower and upper case).

I now need to match A to C with a VLOOKUP function together with the
corresponding data in separate cells.

In other words we have the horse 'Solent' in cell A2. With parsing we might
have 'SOLENT' in cell C78.

I would like SOLENT (or Solent) placed in cell K2 with its corresponding data
in cells L2:R2 from cells D78:J78. The data needs to be listed in cells
K2:K26 so that matches can be checked.

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.