Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Change Cell Format

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..

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Change Cell Format

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.
:)


"SRV....Frenzy" wrote:

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..


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Change Cell Format

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)

"SRV....Frenzy" wrote in message
ps.com...
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..



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Change Cell Format

Hi Bob,

Many Thanks..

Saved a lot of my time,

Cheers,

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Change Cell Format

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...




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Change Cell Format

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)

"SRV....Frenzy" wrote in message
s.com...
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...




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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
cant change the cell format it shows too many different cell form not able to make changes in sheet Excel Worksheet Functions 0 January 9th 07 04:16 AM
Can cell format come from and change with reference cell format jclouse Excel Discussion (Misc queries) 1 November 29th 06 03:20 AM
Change the format of the cell nick Excel Discussion (Misc queries) 2 March 6th 06 04:05 PM
How do I change the default cell format? Álvaro Excel Discussion (Misc queries) 5 February 27th 06 05:47 PM


All times are GMT +1. The time now is 09:48 AM.

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

About Us

"It's about Microsoft Excel"