Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default How do I put spaces in a field

Office 2003 & 2007, Win XP Pro
I have a list of telephone numbers eg:
0117839178
0866610689
0917142591133
I wish to convert them to:
011 783 9178
086 661 0678
091 714 259 1133
All numbers begin with zero.
Much appreciated.


  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How do I put spaces in a field

Perhaps something like this might suffice
In B1, copied down:
=IF(LEN(A1)=10,LEFT(A1,3)&" "&MID(A1,4,3)&"
"&RIGHT(A1,4),IF(LEN(A1)=13,LEFT(A1,3)&" "&MID(A1,4,3)&" "&MID(A1,7,3)&"
"&RIGHT(A1,4),""))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"Stan in South Africa" <me@there wrote in message
...
Office 2003 & 2007, Win XP Pro
I have a list of telephone numbers eg:
0117839178
0866610689
0917142591133
I wish to convert them to:
011 783 9178
086 661 0678
091 714 259 1133
All numbers begin with zero.
Much appreciated.




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How do I put spaces in a field

That may need changing if the inputs are not text but numbers formatted with
a leading zero.
--
David Biddulph

"Max" wrote in message
...
Perhaps something like this might suffice
In B1, copied down:
=IF(LEN(A1)=10,LEFT(A1,3)&" "&MID(A1,4,3)&"
"&RIGHT(A1,4),IF(LEN(A1)=13,LEFT(A1,3)&" "&MID(A1,4,3)&" "&MID(A1,7,3)&"
"&RIGHT(A1,4),""))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 15,500, Files: 352, Subscribers: 53
xdemechanik
---
"Stan in South Africa" <me@there wrote in message
...
Office 2003 & 2007, Win XP Pro
I have a list of telephone numbers eg:
0117839178
0866610689
0917142591133
I wish to convert them to:
011 783 9178
086 661 0678
091 714 259 1133
All numbers begin with zero.
Much appreciated.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I remove leading spaces and leave the remianing spaces w Debi Excel Worksheet Functions 6 February 28th 07 03:29 PM
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
Linked date field in worksheet defaults a blank field as 1/0/1900 AmnNkD Excel Worksheet Functions 2 September 12th 06 05:42 PM
spaces not recognized as spaces windsurferLA Excel Worksheet Functions 9 July 27th 06 11:49 AM
How do you remove excess spaces from an Excel field? sarah_jane Excel Discussion (Misc queries) 1 June 1st 05 08:15 AM


All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"