+ Reply to Thread
Results 1 to 4 of 4

Convert Percentage to number

Hybrid View

  1. #1
    steer.tim@gmail.com
    Guest

    Convert Percentage to number

    Is there a way to convert a range of numbers to a pecent( eg 15 to 15%
    or 0.15) in excel or vba?

    I realise that I can divide it by 100 and then format the cell as
    percent but I have an entire sheet of values that need to be converted
    as part of an importing proceedure in VBA. I can convert each
    individual number but was wondering of there was anything built into
    excel that cound do this all in one go.

    Any help appreciated.

    Regards,

    Tim


  2. #2
    Toppers
    Guest

    RE: Convert Percentage to number

    One way:

    Put 100 in an empty cell and COPY
    Select cells to be converted
    EDIT==>Paste Special==>(Operation)==>Divide
    Clear cell with 100
    Reformat cells to % if required

    (test data first!)

    HTH

    "steer.tim@gmail.com" wrote:

    > Is there a way to convert a range of numbers to a pecent( eg 15 to 15%
    > or 0.15) in excel or vba?
    >
    > I realise that I can divide it by 100 and then format the cell as
    > percent but I have an entire sheet of values that need to be converted
    > as part of an importing proceedure in VBA. I can convert each
    > individual number but was wondering of there was anything built into
    > excel that cound do this all in one go.
    >
    > Any help appreciated.
    >
    > Regards,
    >
    > Tim
    >
    >


  3. #3
    Carim
    Guest

    Re: Convert Percentage to number

    Hi Tim,

    Use following example :

    For k = 1 To 200
    CellVal = ActiveCell.Value
    ActiveCell.FormulaR1C1 = "=" & CellVal & "/100"
    ActiveCell.Offset(1, 0).Select
    Next k

    HTH
    Cheers
    Carim


  4. #4
    Gary Keramidas
    Guest

    Re: Convert Percentage to number

    something like this would work without doing the selects

    For k = 1 To 200
    For Each cell In Range("A" & k)
    cell.Value = cell.Value / 100
    Next
    Next

    --


    Gary


    "Carim" <carim.fam@wanadoo.fr> wrote in message
    news:1141800314.994224.131560@i40g2000cwc.googlegroups.com...
    > Hi Tim,
    >
    > Use following example :
    >
    > For k = 1 To 200
    > CellVal = ActiveCell.Value
    > ActiveCell.FormulaR1C1 = "=" & CellVal & "/100"
    > ActiveCell.Offset(1, 0).Select
    > Next k
    >
    > HTH
    > Cheers
    > Carim
    >




+ 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