Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old September 27th, 2007, 01:45 PM
Registered User
 
Join Date: Sep 2007
Location: Katy, TX, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jcarey00
Default Cell Accounting Format

How do I format a cell with the accounting format so that the $ is always on the far left of the cell regardless of the size of the number?
  #2 (permalink)  
Old September 28th, 2007, 04:47 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Here you have

Sub Format_Cell_Currency()

' Without Decimals
ActiveCell.NumberFormat = "$0"

' Without Decimals
ActiveCell.NumberFormat = "$0.00"

End Sub

Cheers
Shasur


http://www.dotnetdud.blogspot.com

VBA Tips & Tricks (http://www.vbadud.blogspot.com)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select date from cell with m/d/yyyy h:mm format mona_upm84 Excel VBA 2 August 10th, 2008 05:58 PM
Accounting application tsimsha ASP.NET 1.0 and 1.1 Basics 1 March 27th, 2006 11:59 PM
Accounting System fahimtufail C# 1 April 9th, 2005 05:23 PM
Accounting Database Lighthouse Access VBA 4 April 4th, 2004 05:35 PM
format Table and Cell in XSL? bebe XML 2 November 13th, 2003 01:49 PM





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