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

if you want to put the various values from D:J into K:R, then start with
this formula in K2 (assumes helper column C)
=IF(ISNA(VLOOKUP($A2,$C$2:$J$1501,2,0)),"",VLOOKUP ($A2,$C$2:$J$1501,2,0))
then fill it to the right into columns L:R on row 2.
Then starting in L2, change the ,2,0) portion of the formula to ,3,0)
in M2, change ,2,0) to ,4,0)
in N2, change ,2,0) to ,5,0)
see the pattern emerging? If not, ...
in O2, change ,2,0) to ,6,0)
in P2, change ,2,0) to ,7,0)
in Q2, change ,2,0) to ,8,0)
and finally in R2, change ,2,0) to ,9,0)
now you can fill the formulas down as far as you need to.


The above works a treat, thanks.

Just one minor problem though.

In column B (imported data) on this particular day, there are horses namely
CELTIC SPA and CELTIC SPIRIT. Both, naturally get parsed to CELTIC in the
'helper' column C using the function,

=IF(ISERR(LEFT(B2,FIND(" ",B2)-1)),B2,LEFT(B2,FIND(" ",B2)-1))

By default the information returned will always be the first in the listing.
I could overcome this by doing a manual check.

As described before data in column A is derived from a different source than
column B. The original raw data in A looks like this for example:-
Solent 36
Group Captain 29
Before You Go 23
Purple Moon 37
Halla San 29
Strategic Mount 324
John Terry 16
Celtic Spirit 32
Misty Dancer 36
Mull Of Dubai 24
Dan Dare 29
High Treason 16
Instructor 84 (59J)
Masterofthecourt 11

From the other source it is words only, all capitalised.

Is there not a function that would omit the numbers and brackets, so that all
the lettering remained? This would avoid confusion regarding VLOOKUP.

If this were not possible, could conditional formatting be applied to
'helper' column C which would highlight similarities?

Thanks so much again.

You made my day!