+ Reply to Thread
Results 1 to 7 of 7

another VBA newbie question

  1. #1
    Registered User
    Join Date
    06-02-2005
    Posts
    8

    another VBA newbie question

    how can I change a number in the cell to percentage format??
    like I have 0.5 in a cell, how can I use vb code change it to 50%?
    thanks

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    In the menu, select Format > Cells. Select Number tab, and percentage.

    Mangesh

  3. #3
    Registered User
    Join Date
    06-02-2005
    Posts
    8
    correct, but how can we do this in vba to make it automatic??

  4. #4
    skiloa
    Guest

    Re: another VBA newbie question

    FormatPercent(range("a1"), 0)


  5. #5
    JE McGimpsey
    Guest

    Re: another VBA newbie question

    One way:

    Range("A1").NumberFormat = "0%"

    In article <[email protected]>,
    lang0477 <[email protected]>
    wrote:

    > how can I change a number in the cell to percentage format??
    > like I have 0.5 in a cell, how can I use vb code change it to 50%?
    > thanks


  6. #6
    Mangesh Yadav
    Guest

    Re: another VBA newbie question

    abc = Format(0.5, "0.00%")

    Mangesh



    "lang0477" <[email protected]> wrote in
    message news:[email protected]...
    >
    > correct, but how can we do this in vba to make it automatic??
    >
    >
    > --
    > lang0477
    > ------------------------------------------------------------------------
    > lang0477's Profile:

    http://www.excelforum.com/member.php...o&userid=23975
    > View this thread: http://www.excelforum.com/showthread...hreadid=377693
    >




  7. #7
    Registered User
    Join Date
    06-02-2005
    Posts
    8
    Those all works, thanks guys

+ 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