LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Cell format

Just My 2 cents:

Sub FixName()
Dim Comma1 As String, StrChk As Variant, Cnt
Dim LR As Long
Application.ScreenUpdating = False
LR = ActiveCell.SpecialCells(xlLastCell).Row
Cnt = 1
Range("A1").Activate
Comma1 = InStr(1, ActiveCell.Value, ",")
Do
Do
StrChk = Mid(ActiveCell.Value, Comma1 - Cnt, 1)
If IsNumeric(StrChk) = True Then
Cnt = Cnt + 1
Else
ActiveCell.Value = Left(ActiveCell.Value, Comma1 -
Cnt) _
& " " & Mid(ActiveCell.Value, Comma1 + 2, Len
(ActiveCell.Value))
End If
Loop Until IsNumeric(StrChk) = False
ActiveCell.Offset(1).Activate
Cnt = 1
Comma1 = InStr(1, ActiveCell.Value, ",")
Loop Until ActiveCell.Row LR

End Sub

HTH


-----Original Message-----
I have an issue I think can be solved with a Custom Cell

Format. The problem
is I'm not sure how to write the format. I have a Name

column formated as
General. The data looks like this in each cell:

Smith1234, John
How do I reformat the cell to knock out the numbers and

leave me with Smith,
John. Manually doing this would be consuming as I am

trying to change about
4000 entries. Thanks in advance for any help!


.

 
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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
cell format - remove cell format pattern without effecting colors Bas Excel Discussion (Misc queries) 1 March 23rd 09 02:54 PM
Can cell format come from and change with reference cell format jclouse Excel Discussion (Misc queries) 1 November 29th 06 03:20 AM
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM


All times are GMT +1. The time now is 01:13 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"