UK Postcode Separation

  • Thread starter Thread starter PC
  • Start date Start date
P

PC

Help!

I have managed to separate the UK postal code:

AA1 0XX

into

AA1

using the find function but I want to isolate it to:

AA

and

1

I can't tell it to do the first two characters from the third as I
would also need to separate:

B91

to

B

and

91

So i need trim according to whether it is a letter or a number and
isolate the letters into a sep cell from the numbers. I don't think it
can be done...

Anybody got any ideas?

Thanks for your help!

PC
 
One way:
=LEFT(A1,1+(CODE(MID(A1,2,1))>64))

Thanks! Just one more thing - how to isolate the numbers on the right?
(remembering it could be AB 7 or B 68...

Muchos thankos, this will make my life a whole lot easier!!

PC
 
Given the constraint that the alpha characters, one way:

=MID(A1, 2+(CODE(MID(A1,2,1))>64),255)

where 255 is just an arbitrarily large number so that all the
characters to the right are returned.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top