Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Split 2 names within a cell in excel

Does anyone know of a way to insert a space in 1 excel cell i.e. FrankJones -
insert space - Frank Jones
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default Split 2 names within a cell in excel

Put this array formula in B1

=MIN(IF(EXACT(MID(A1,ROW(INDIRECT("2:"&LEN(A1))),1 ),UPPER(MID(A1,ROW(INDIRECT("2:"&LEN(A1))),1))),RO W(INDIRECT("A2:A"&LEN(A1)))))

as an array formula, it has to be entered with Ctrl-Shift-Enter, not just
Enter, and in C1

=LEFT(A1,B1-1)&" "&RIGHT(A1,LEN(A1)-B1+1)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"LBristow" wrote in message
...
Does anyone know of a way to insert a space in 1 excel cell i.e.
FrankJones -
insert space - Frank Jones
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Split 2 names within a cell in excel

That's pretty slick.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Bob Phillips" wrote:

Put this array formula in B1

=MIN(IF(EXACT(MID(A1,ROW(INDIRECT("2:"&LEN(A1))),1 ),UPPER(MID(A1,ROW(INDIRECT("2:"&LEN(A1))),1))),RO W(INDIRECT("A2:A"&LEN(A1)))))

as an array formula, it has to be entered with Ctrl-Shift-Enter, not just
Enter, and in C1

=LEFT(A1,B1-1)&" "&RIGHT(A1,LEN(A1)-B1+1)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"LBristow" wrote in message
...
Does anyone know of a way to insert a space in 1 excel cell i.e.
FrankJones -
insert space - Frank Jones
Thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Split 2 names within a cell in excel

Thanks Bob - problem solved.

Liz

"Bob Phillips" wrote:

Put this array formula in B1

=MIN(IF(EXACT(MID(A1,ROW(INDIRECT("2:"&LEN(A1))),1 ),UPPER(MID(A1,ROW(INDIRECT("2:"&LEN(A1))),1))),RO W(INDIRECT("A2:A"&LEN(A1)))))

as an array formula, it has to be entered with Ctrl-Shift-Enter, not just
Enter, and in C1

=LEFT(A1,B1-1)&" "&RIGHT(A1,LEN(A1)-B1+1)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"LBristow" wrote in message
...
Does anyone know of a way to insert a space in 1 excel cell i.e.
FrankJones -
insert space - Frank Jones
Thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Split 2 names within a cell in excel

Sub finducase()
For Each c In Range("a4:a7")
For i = 2 To Len(c)
If Mid(c, i, 1) = UCase(Mid(c, i, 1)) Then x = i - 1
Next i
c.Value = Left(c, x) & " " & Right(c, Len(c) - x)
Next c
End Sub

--
Don Guillett
SalesAid Software

"LBristow" wrote in message
...
Does anyone know of a way to insert a space in 1 excel cell i.e.
FrankJones -
insert space - Frank Jones
Thanks





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Split 2 names within a cell in excel

On Thu, 1 Feb 2007 08:15:00 -0800, LBristow
wrote:

Does anyone know of a way to insert a space in 1 excel cell i.e. FrankJones -
insert space - Frank Jones
Thanks


And another method using Regular Expressions:

Download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/

Then use this formula to insert a space prior to the last capital letter in the
sequence.

=REGEX.SUBSTITUTE(A1,"([A-Z])([a-z]+$)"," [1][2]")
--ron
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Split 2 names within a cell in excel

On Thu, 01 Feb 2007 12:40:08 -0500, Ron Rosenfeld
wrote:

On Thu, 1 Feb 2007 08:15:00 -0800, LBristow
wrote:

Does anyone know of a way to insert a space in 1 excel cell i.e. FrankJones -
insert space - Frank Jones
Thanks


And another method using Regular Expressions:

Download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/

Then use this formula to insert a space prior to the last capital letter in the
sequence.

=REGEX.SUBSTITUTE(A1,"([A-Z])([a-z]+$)"," [1][2]")
--ron


Or, a little simpler:

=REGEX.SUBSTITUTE(A1,"([A-Z][a-z]+$)"," [1]")


--ron
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
Trying to split a cell in Excel 2003, just like in Word Tables Kjandar Excel Discussion (Misc queries) 3 March 21st 12 07:36 PM
Can I split a excel cell w/out adding a column? Cheryl Excel Discussion (Misc queries) 1 April 19th 06 04:22 PM
Pasting Word table cell with paragraph markers into single Excel c Steve Excel Discussion (Misc queries) 1 June 16th 05 11:26 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:30 AM.

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"