Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formating column cells
I have a column full of single-word names. I want to
insert a dot (.) after every two consecutive letters. For example if the name is: Amjad, then it will become: Am.ja.d Is there a quick way of doing that? like selecting the whole column then format its contents in the manner described above? Thanks Amjad |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formating column cells
Amjad,
Sub testit() Const cInterval = 2 Dim rng As Range, strTemp As String, i As Long With ActiveSheet For Each rng In Range(.Cells(1, 1), .Cells(Rows.Count, 1).End(xlUp)) i = 1: strTemp = "" Do Until i Len(rng.Value) If i 1 Then strTemp = strTemp & "." strTemp = strTemp & Mid(rng.Value, i, cInterval) i = i + cInterval Loop Debug.Print strTemp Next End With End Sub Rob "Amjad" wrote in message ... I have a column full of single-word names. I want to insert a dot (.) after every two consecutive letters. For example if the name is: Amjad, then it will become: Am.ja.d Is there a quick way of doing that? like selecting the whole column then format its contents in the manner described above? Thanks Amjad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formating a single column of info into 3 columns | New Users to Excel | |||
Conditional Formating if Greater Than or Less Than other column | Excel Worksheet Functions | |||
conditional formating cells i Excel based on other cells values | Excel Worksheet Functions | |||
Column formating help! | Excel Worksheet Functions | |||
formating a column | Excel Worksheet Functions |