View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Formating percentage in macro

hi
you didn't say how many cells or which cells so.......
format each cell you put it in......
Range("A1").Value = saskour20per
Range("A1").NumberFormat = "0.00%"
Range("B2").Value = saskour20per
Range("B2").NumberFormat = "0.00%"
Range("C3").Value = saskour20per
Range("C3").NumberFormat = "0.00%" each cell you put it in....
if you are working with variables just substitute the range address with
the variable.

REgards
FSt1

"orquidea" wrote:

Hi

In the below subprocedure I want to format Saskour20per with %. This result
Saskour20per will be placed in different cells depending of some if
conditions, therefore I can't set a Range("A1") for example.

Saskour20per = (saskour20 / sask20)
How could I do that.

Thanks in advance.
Orquidea