excel cell format change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TcoUpLoad
    New Member
    • Aug 2007
    • 2

    #1

    excel cell format change

    Hi,
    Anyone knows how i can change cell format in excel with a code line?
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Select the cell and change format :

    For Number formatting
    [code=vb]
    Range("D8").Sel ect
    Selection.Numbe rFormat = "0.00"
    Columns("D:D"). ColumnWidth = 15
    [/code]

    Date Formatting :
    [code=vb]
    Range("D11").Se lect
    Selection.Numbe rFormat = "d-mmm-yy"
    [/code]

    REgards
    Veena

    Comment

    • TcoUpLoad
      New Member
      • Aug 2007
      • 2

      #3
      Hi,
      In that order for time will be samething like

      .....numberform at="hh:mm:ss"

      right?

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        U can try this :

        [code=vb]
        Range("D8").Sel ect
        Selection.Numbe rFormat = "[h]:mm:ss;@"
        [/code]


        REgards
        Veena

        Comment

        Working...