View Single Post
  #2   Report Post  
Max
 
Posts: n/a
Default

Assuming the data is in col A, in A1 down,
and is identical in structure, e.g. you have

in A1: KL7746
in A2: BA1234
etc

then something like this might suffice

Put in B1:
=VLOOKUP(LEFT(TRIM(A1),2),{"KL","KLM";"BA","BAW"}, 2,0)&RIGHT(TRIM(A1),4)
Copy down

For the sample data, you'd get in B1:B2 :

KLM7746
BAW1234

Adapt to suit ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Andy100" wrote in message
...
How do i get excel to replace words from data imported from the net.

Here is the problem. I am using excel to fetch data from a flight

timetable,
however, when it says "KL" for the flight number, i want it to correct
itself to "KLM". Also, when it says "BA", i want it to correct itself to
"BAW".

i.e. "KL7746" would automatically change to "KLM7746".


Thanks in advance !


Regards
Andrew