A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formula help



 
 
Thread Tools Display Modes
  #1  
Old March 14th, 2010, 08:01 PM posted to microsoft.public.excel.newusers
George Gee
external usenet poster
 
Posts: 111
Default Formula help

I have a column of map grid references with the structu SD642522

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


Many thanks

George Gee
  #2  
Old March 14th, 2010, 08:43 PM posted to microsoft.public.excel.newusers
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Formula help

"George Gee" wrote:
I have a column of map grid references with the structu 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.

  #3  
Old March 14th, 2010, 09:02 PM posted to microsoft.public.excel.newusers
George Gee
external usenet poster
 
Posts: 111
Default Formula help

On 14/03/2010 20:43, Joe User wrote:
"George Gee" wrote:
I have a column of map grid references with the structu 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.



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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.