View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default copping data from two cells into one

thank you for your response works perfect on postcodes with 2 letters
Yup, that earlier response answers it on the face of your original post.
Press the "Yes" button for that response, won't you?

.. but not single ones

Hey, this is a new query altogether. One thought to pursue is to keep it
simple: Separate your reference list in cols M & N into 2 lists by single &
double letters. Then structure it up likewise in another col, eg let's say
you now have the single letter ref lists in cols O & P (so cols M & N would
now house only the double letter codes).

Use in say C2, copied down:
=INDEX(P:P,MATCH(LEFT(A2),O:O,0))
to get it for the single letters

Then "tie"* the returns from the 2 formulated cols B & C in say, col D
In D2, copied down:
=INDEX(B2:C2,MATCH(TRUE,INDEX((ISNUMBER(B2:C2)),), 0))
*an intentional sequential checking of 2 letter codes ahead of single letter
codes
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---