Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default another VBA newbie question


how can I change a number in the cell to percentage format??
like I have 0.5 in a cell, how can I use vb code change it to 50%?
thank

--
lang047
-----------------------------------------------------------------------
lang0477's Profile: http://www.excelforum.com/member.php...fo&userid=2397
View this thread: http://www.excelforum.com/showthread.php?threadid=37769

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default another VBA newbie question

FormatPercent(range("a1"), 0)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default another VBA newbie question

One way:

Range("A1").NumberFormat = "0%"

In article ,
lang0477
wrote:

how can I change a number in the cell to percentage format??
like I have 0.5 in a cell, how can I use vb code change it to 50%?
thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default another VBA newbie question


In the menu, select Format Cells. Select Number tab, and percentage.


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=377693

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default another VBA newbie question


correct, but how can we do this in vba to make it automatic?

--
lang047
-----------------------------------------------------------------------
lang0477's Profile: http://www.excelforum.com/member.php...fo&userid=2397
View this thread: http://www.excelforum.com/showthread.php?threadid=37769



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default another VBA newbie question

abc = Format(0.5, "0.00%")

Mangesh



"lang0477" wrote in
message ...

correct, but how can we do this in vba to make it automatic??


--
lang0477
------------------------------------------------------------------------
lang0477's Profile:

http://www.excelforum.com/member.php...o&userid=23975
View this thread: http://www.excelforum.com/showthread...hreadid=377693



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default another VBA newbie question


Those all works, thanks guys :

--
lang047
-----------------------------------------------------------------------
lang0477's Profile: http://www.excelforum.com/member.php...fo&userid=2397
View this thread: http://www.excelforum.com/showthread.php?threadid=37769

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
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Newbie question: Berra Charts and Charting in Excel 2 December 11th 06 10:00 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
Newbie Question Pete B Excel Discussion (Misc queries) 0 December 29th 05 11:27 AM
newbie question cyclingsal Excel Programming 1 May 7th 04 08:52 PM


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

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"