Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to type 123 & have it print 1.23 without using Options..edit?

I want to format a range of cells so that it automatically places the decimal
point as if it were money...i.e. type 123 & have it print 1.23. I want to do
this without using the Options....edit which does it for the whole
spreadsheet, thus not allowing different types of number formats elsewhere in
the spreadsheet. I don't have any negative numbers, and I feel the answer is
in the custom number format, but I haven't been able to figure how it works.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default How to type 123 & have it print 1.23 without using Options..edit?

This Custom Format will do what you're asking:

0\.00

However, be careful, because this ONLY affects the display, and not the
number that is stored. So, 123 would appear as 1.23, but would still be
treated as One-Hundred-Twenty-Three. If you need to use these cells for
calculations, then first divide them by 100.

HTH,
Elkar


"Jim Wyns" wrote:

I want to format a range of cells so that it automatically places the decimal
point as if it were money...i.e. type 123 & have it print 1.23. I want to do
this without using the Options....edit which does it for the whole
spreadsheet, thus not allowing different types of number formats elsewhere in
the spreadsheet. I don't have any negative numbers, and I feel the answer is
in the custom number format, but I haven't been able to figure how it works.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How to type 123 & have it print 1.23 without using Options..edit?

Event code for a range can do what you want.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Not Application.Intersect(Range("A1:A30"), Target) Is Nothing Then
n = Target.Row
If Excel.Range("A" & n).Value < "" Then
Excel.Range("A" & n).Value = Excel.Range("A" & n).Value / 100
End If
End If
enditall:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.


Gord Dibben MS Excel MVP

On Thu, 12 Oct 2006 10:14:02 -0700, Jim Wyns <Jim
wrote:

I want to format a range of cells so that it automatically places the decimal
point as if it were money...i.e. type 123 & have it print 1.23. I want to do
this without using the Options....edit which does it for the whole
spreadsheet, thus not allowing different types of number formats elsewhere in
the spreadsheet. I don't have any negative numbers, and I feel the answer is
in the custom number format, but I haven't been able to figure how it works.


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
Setting print options globally ? tcurrier Excel Discussion (Misc queries) 1 February 20th 06 09:48 PM
Footer does not print on bottom of document Frustrated... Excel Discussion (Misc queries) 3 January 25th 06 08:44 PM
set the print area print multiple tabs veng Excel Discussion (Misc queries) 5 February 12th 05 07:01 PM
I want to type a poem and print it pualei28 New Users to Excel 3 February 10th 05 12:40 PM
Printing - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM


All times are GMT +1. The time now is 08:18 PM.

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"