+ Reply to Thread
Results 1 to 4 of 4

format column

  1. #1
    Sean
    Guest

    format column

    The column is supposed to be time field as 15:30:25. But it currently shows
    as general like 0.646064815. How can I format the column to display as time
    in macro?

    Thanks.


  2. #2
    Tim Williams
    Guest

    Re: format column

    ActiveSheet.Columns(1).NumberFormat = "h:mm:ss;@"

    --
    Tim Williams
    Palo Alto, CA


    "Sean" <[email protected]> wrote in message
    news:[email protected]...
    > The column is supposed to be time field as 15:30:25. But it currently

    shows
    > as general like 0.646064815. How can I format the column to display as

    time
    > in macro?
    >
    > Thanks.
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: format column

    ActiveCell.Numberformat = "hh:mm:ss"


    or if you will be showing hours more than 24

    ActiveCell.Numberformat = "[hh]:mm:ss"

    --
    Regards,
    Tom Ogilvy


    "Sean" <[email protected]> wrote in message
    news:[email protected]...
    > The column is supposed to be time field as 15:30:25. But it currently

    shows
    > as general like 0.646064815. How can I format the column to display as

    time
    > in macro?
    >
    > Thanks.
    >




  4. #4
    Sean
    Guest

    Re: format column

    Thanks, Tim & Tom. It works.

    "Tom Ogilvy" wrote:

    > ActiveCell.Numberformat = "hh:mm:ss"
    >
    >
    > or if you will be showing hours more than 24
    >
    > ActiveCell.Numberformat = "[hh]:mm:ss"
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Sean" <[email protected]> wrote in message
    > news:[email protected]...
    > > The column is supposed to be time field as 15:30:25. But it currently

    > shows
    > > as general like 0.646064815. How can I format the column to display as

    > time
    > > in macro?
    > >
    > > Thanks.
    > >

    >
    >
    >


+ 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