Use the format function as in,
Format("f123456789","@.@@@.@@@.@@@")
Let me know if this was what you ere looking for
Ajit
On Wed, Oct 1, 2008 at 3:53 AM, <[EMAIL PROTECTED]> wrote:
>
> I need a macro that will add periods at specific locations in a cell
> of text in Excel. My example is an
=LEFT(A1,1)&"."&MID(A1,2,3)&"."&MID(A1,5,3)&"."&MID(A1,8,3)
can do the job if your text if A1
Regards
Rahul
On Tue, Sep 30, 2008 at 4:23 PM, <[EMAIL PROTECTED]> wrote:
>
> I need a macro that will add periods at specific locations in a cell
> of text in Excel. My example is an item number f12345
Hi,
You can try the following VBA code.
Sincerely ,
ASD
* * *
Sub PutPeriods()
Dim lpString As String
Dim lpActiveString As String
Dim iCount As Integer
lpString = Space(2) & Trim(ActiveCell)
lpActiveString = ""
For iCount = 1 To Len(lpString) Step 1
If iCount Mod 3 <> 0 Then lpActiveString =