Formula help

G

George Gee

I have a column of map grid references with the structure: SD642522

How would I go about changing them to: SD 64200 52200


Many thanks

George Gee
 
J

Joe User

George Gee said:
I have a column of map grid references with the structure: SD642522
How would I go about changing them to: SD 64200 52200

If the grid ref is always 2 letters and 6 digits:

1. The first part can be isolated with LEFT(A1,2).
2. The middle part with MID(A1,3,3).
3. The last part with RIGHT(A1,3).

If you want them in separate cells, then use =LEFT(A1,2) etc.

Alternatively, you could use the Text To Columns wizard (Data > Text to
Columns.

If you want them in one cell, then:

=LEFT(A1,2) & " " & MID(A1,3,3) & " " & RIGHT(A1,3)

If you want that to replace the original grid ref, then copy the cell with
the above formula and paste-special-value into A1.
 
G

George Gee

If the grid ref is always 2 letters and 6 digits:

1. The first part can be isolated with LEFT(A1,2).
2. The middle part with MID(A1,3,3).
3. The last part with RIGHT(A1,3).

If you want them in separate cells, then use =LEFT(A1,2) etc.

Alternatively, you could use the Text To Columns wizard (Data > Text
to Columns.

If you want them in one cell, then:

=LEFT(A1,2) & " " & MID(A1,3,3) & " " & RIGHT(A1,3)

If you want that to replace the original grid ref, then copy the cell
with the above formula and paste-special-value into A1.


OK, thanks for the pointers, I needed the trailing "00"s, so used this:
=LEFT(A1,2) & " " & MID(A1,3,3) & "00 " & RIGHT(A1,3) &"00"

Cheers
George Gee
 

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

cutting and pasting ranges using offsets 2
Count occurrences of dates 9
Un-assign a macro 2
Subtotal 6
Date formula 5
Conditional Format 2
Change negative amount to positive. 2
SQL statement 10

Top