#1   Report Post  
mlou
 
Posts: n/a
Default Excel decimal format

from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?
  #2   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default

mlou wrote:
from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?


Just highlight the column you want it to affect, then right click and
select format cells.

Bill
  #3   Report Post  
mlou
 
Posts: n/a
Default

what I really need is to be able to type in 12345 and have it show as 123.45
(without typing the decimal)in just one column, not the whole worksheet. by
right-clicking on the column and formatting cells, I still have to type
decimal, don't I?
"Bill Martin -- (Remove NOSPAM from addre" wrote:

mlou wrote:
from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?


Just highlight the column you want it to affect, then right click and
select format cells.

Bill

  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

mlou

For just one column you would need event code.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
With Target
If .Value < "" Then
.Value = .Value / 100
.NumberFormat = "$#,##0.00"
'remove the $ sign if don't want currency format
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

Right-click your worksheet tab and "View Code". Copy/paste into that module.

Enter 1234 in A1 and see $12.34 returned.


Gord Dibben Excel MVP

On Tue, 19 Apr 2005 14:40:02 -0700, "mlou"
wrote:

from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?


  #5   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default

mlou wrote:
what I really need is to be able to type in 12345 and have it show as 123.45
(without typing the decimal)in just one column, not the whole worksheet. by
right-clicking on the column and formatting cells, I still have to type
decimal, don't I?



Having a cell display a different number than you've entered into the
cell is beyond anything I can think of. If it were me, I'd type 12345
into one column and have it display in another one. Divide by 100 and
have the other column formatted to display two decimal positions.

Good luck with it...

Bill


  #6   Report Post  
Brett
 
Posts: n/a
Default

You could create the custom number format 0\.00
That would easily display 12345 as 123.45, but then if you need to reference
the value in a formula you will have to divide it by 100 in the formula.

"mlou" wrote:

from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?

  #7   Report Post  
mlou
 
Posts: n/a
Default

brett,
lots easier than writing script - I'll try it. thanks
mlou

"Brett" wrote:

You could create the custom number format 0\.00
That would easily display 12345 as 123.45, but then if you need to reference
the value in a formula you will have to divide it by 100 in the formula.

"mlou" wrote:

from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?

  #8   Report Post  
mlou
 
Posts: n/a
Default

gord
thanks - sounds complicated (!) but I'll give it a shot.
mlou

"Gord Dibben" wrote:

mlou

For just one column you would need event code.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
With Target
If .Value < "" Then
.Value = .Value / 100
.NumberFormat = "$#,##0.00"
'remove the $ sign if don't want currency format
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

Right-click your worksheet tab and "View Code". Copy/paste into that module.

Enter 1234 in A1 and see $12.34 returned.


Gord Dibben Excel MVP

On Tue, 19 Apr 2005 14:40:02 -0700, "mlou"
wrote:

from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?



  #9   Report Post  
Gord Dibben
 
Posts: n/a
Default

Try it....you'll like it.

Gord

On Wed, 20 Apr 2005 08:30:03 -0700, "mlou"
wrote:

gord
thanks - sounds complicated (!) but I'll give it a shot.
mlou

"Gord Dibben" wrote:

mlou

For just one column you would need event code.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
With Target
If .Value < "" Then
.Value = .Value / 100
.NumberFormat = "$#,##0.00"
'remove the $ sign if don't want currency format
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

Right-click your worksheet tab and "View Code". Copy/paste into that module.

Enter 1234 in A1 and see $12.34 returned.


Gord Dibben Excel MVP

On Tue, 19 Apr 2005 14:40:02 -0700, "mlou"
wrote:

from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Excel decimal format

This custom number format really helped me. Now, is there a way to add the
comma dividing the thousands? #,###.##

"Brett" wrote:

You could create the custom number format 0\.00
That would easily display 12345 as 123.45, but then if you need to reference
the value in a formula you will have to divide it by 100 in the formula.

"mlou" wrote:

from the tools menu, i clicked options, edit and "fixed decimal" to two.
However, I don't want this to affect the whole worksheet, just one column.
is there a way to do that?



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default Excel decimal format

Assuming you will never have a formatted amount of one million dollars or
more, try this Custom Format...

[<100000]0\.00;0\,000\.00

--
Rick (MVP - Excel)


"Sheba" wrote in message
...
This custom number format really helped me. Now, is there a way to add
the
comma dividing the thousands? #,###.##

"Brett" wrote:

You could create the custom number format 0\.00
That would easily display 12345 as 123.45, but then if you need to
reference
the value in a formula you will have to divide it by 100 in the formula.

"mlou" wrote:

from the tools menu, i clicked options, edit and "fixed decimal" to
two.
However, I don't want this to affect the whole worksheet, just one
column.
is there a way to do that?


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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Format a cell to display decimal hours. Fred Holmes Excel Discussion (Misc queries) 2 March 18th 05 03:32 PM
Numbers after decimal point excel to word mail merge Andy P Excel Worksheet Functions 1 March 15th 05 11:48 AM
how to format excel format to text format with separator "|" in s. azlan New Users to Excel 1 January 31st 05 12:57 PM
Import Indian Rupees as a number format in Excel Aditya Khandekar Excel Discussion (Misc queries) 2 December 6th 04 03:48 PM


All times are GMT +1. The time now is 07:13 PM.

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"