Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assuming the only comma and space are as indicated, this UDF should do it.
Public Function FixName(argRange As Range) As String FixName = Replace(Split(argRange, " ")(0), ",", ", ") End Function You should add error checking to ensure that argRange is a single cell. NickHK "crowdx42" wrote in message ... Ok, so I have names in a column which I want to both insert a space after a "," and then delete everything after the second word space. i.e James,Patrick Coogan needs to be James, Patrick Can this be done? Thanks in advance You guys have been very patient and I very much appreciate all the help. Patrick:) -- crowdx42 ------------------------------------------------------------------------ crowdx42's Profile: http://www.excelforum.com/member.php...o&userid=37749 View this thread: http://www.excelforum.com/showthread...hreadid=574054 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Matching names and inserting spaces | Excel Worksheet Functions | |||
Matching names and inserting spaces | Excel Worksheet Functions | |||
Deleting spaces | Excel Discussion (Misc queries) | |||
Inserting/Deleting Spaces | Excel Worksheet Functions | |||
Excel – Macro Problem – Inserting, Appending Data, Deleting | Excel Programming |