Change Cell Format

S

SRV....Frenzy

Hi all,

Can you suggets how can i change the format of my cell to accept
percentage with two decimal places?

Since, i am adding a new worksheet in my code, i also need to make
sure that the cells have percentage format... have a look

ActiveWorkbook.ActiveSheet.Range("G5").Formula = "=F5/F15"

I want to change the format of G5 cell

Please, provide the code..

thanks in anticipation..
 
B

Barb Reinhardt

If I don't remember how to do certain things in VBA, I often record a macro
doing exactly what I want and then lift that section of the code. Try it.
:)
 
B

Bob Phillips

With ActiveWorkbook.ActiveSheet.Range("G5")
.Formula = "=F5/F15"
.Numberformat = "0%"
End With


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
S

SRV....Frenzy

Hi Bob,

Sorry to bother you again,

can you show me how can i sort a column just added to worksheet. It
consists of numbers
Can we not do something like sort for some range
like sort (E5:E15)

can you suggest something...
 
B

Bob Phillips

Range("E5:E15).Sort Key1:=Range("E15"), Order1:=xlAscending,
Header:=xlNo

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top