Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default 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

" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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" wrote in message
oups.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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert percentage into margin Linda Excel Worksheet Functions 2 April 15th 10 04:06 PM
Add a percentage to a number Allen Excel Discussion (Misc queries) 3 September 17th 07 11:56 AM
Convert Percentage to total number of NPT Days Peledon Excel Worksheet Functions 11 April 19th 07 12:00 PM
Convert Percentage to Text Kinjalip Excel Discussion (Misc queries) 2 September 28th 05 01:53 PM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM


All times are GMT +1. The time now is 06:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"