Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2007, 06:08 AM
Authorized User
 
Join Date: Apr 2007
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Formatting the cells from VBA

I want to format the range of cell's as Percentage from VBA.

Yogesh
__________________
Yogesh
 
Old July 20th, 2007, 12:26 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

You can try this yogesh

    Sub Format_Cell_Percent()

' Without Decimals
ActiveCell.NumberFormat = "0%"

' With Decimals (Two places)
ActiveCell.NumberFormat = "0.00%"

End Sub

Cheers
Shasur

http://www.dotnetdud.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting Cells using VBA james_sellwood Excel VBA 7 October 8th, 2012 01:58 PM
Formatting Excel Cells Within ActiveX script ninel SQL Server DTS 3 January 28th, 2008 04:17 PM
VBA Formatting cells with Html tags read from XML hemagiri Excel VBA 0 November 22nd, 2006 02:41 AM
Trouble with formatting text in table cells! Sickopuppie HTML Code Clinic 5 June 21st, 2006 03:17 AM
Formatting e.Item.Cells in Datagrid rstelma ASP.NET 1.0 and 1.1 Professional 18 February 26th, 2006 07:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.