Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Format a cell to display decimal hours. | Excel Discussion (Misc queries) | |||
Numbers after decimal point excel to word mail merge | Excel Worksheet Functions | |||
how to format excel format to text format with separator "|" in s. | New Users to Excel | |||
Import Indian Rupees as a number format in Excel | Excel Discussion (Misc queries) |