+ Reply to Thread
Results 1 to 8 of 8

cell formatting

Hybrid View

  1. #1
    Registered User
    Join Date
    05-30-2005
    Posts
    38

    Angry cell formatting

    how can i format the cell if type 00146f7ebg96
    out put is 00:14:6f:7e:bg:96 automatic


    tnx in advance


    godspeed

  2. #2
    Registered User
    Join Date
    05-30-2005
    Posts
    38

    cell formatting

    up

    any idea?

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    You will need VBA or a formula in another cell

  4. #4
    Registered User
    Join Date
    05-30-2005
    Posts
    38

    cell formatting

    what is the command?

    tnx

  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by xtrmhyper
    what is the command?

    tnx
    Hi

    in the worksheet tab, rightmouse the tab and select View Code and paste this into there
    Private Sub worksheet_change(ByVal Target As Range)
    Dim myV As String, myValue As String, mc As String
    If Target.Cells.count = 1 And Target.Column = 1 And Not IsEmpty(Target) Then
        mc = ":"
        myV = Target.Value
        If Len(myV) = 12 Then
            myValue = Mid(myV, 1, 2) & mc & Mid(myV, 3, 2) & mc & Mid(myV, 5, 2) & mc & Mid(myV, 7, 2) & mc & Mid(myV, 9, 2) & mc & Mid(myV, 11, 2)
            Target.Value = myValue
            End If
        End If
    End Sub
    any single cell 12 figure entry will be converted, but you will not be able to use the field as = 00146f7ebg96 for comparison or lookup etc.

    hth
    ---
    Si fractum non sit, noli id reficere.

  6. #6
    Registered User
    Join Date
    05-30-2005
    Posts
    38

    Talking cell formatting

    thank you sir its work

    how can change the formula in column b,c or d only


    tnx in advance

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1