Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Excel decimal moving?

Lee

Sub fixed_decimal_toggle()
Application.FixedDecimal = Not Application.FixedDecimal
End Sub

Or try this event code which divides any number entered in Column B by 10000

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Target.Cells.Column = 2 Then
'For a range use
'If Not Application.Intersect(Range("A1:A40"), Target) Is Nothing Then
If Not IsNumeric(Target.Value) Then Exit Sub
Application.EnableEvents = False
With Target
.Value = .Value / 10000

End With
End If
Application.EnableEvents = True
End Sub

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

Copy/paste into that module.

Adjust to suit......Column = 2 is B = 3 is C, etc.


Gord Dibben MS Excel MVP

On Wed, 11 Apr 2007 07:50:02 -0700, Lee wrote:

thanks for your prompt info, it helped alot. i was wondering is it possible
to create a macro button to turn this on and off in my toolbar rather than
going into the menu every time i want to input in this way?
thanks

"William Horton" wrote:

From the menu path choose TOOLS / OPTIONS. Click on the EDIT tab. Then
check the FIXED DECIMAL check box. Then enter the number of decimal places
you want in the PLACES field. Click OK and you are good to go. This will
work for every single cell in every single workbook you have. You will have
to turn this off once you are done using it in this manner.

Hope this helps.

Bill Horton

"Lee" wrote:

I am trying to format a cell so that i can input a number and excel will
automatically place the decimal point for me. for eg.

i want to type 12 i want excel to put 0.0012 etc
i want to type 1 i want excel to put 0.0001

can this be done, ive tried to put this in the help but got no joy. pls can
anyone help. I know i can do this by adding other coulmns and doing a
division calculation but that is a messy way for the SS im creating.

thanks
lee


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
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 10:38 PM
Batch converting CSV files from comma-decimal to period-decimal Nodles Excel Discussion (Misc queries) 3 July 5th 06 06:57 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. SUKYKITTY Excel Discussion (Misc queries) 3 July 6th 05 01:50 PM
Moving Decimal Places Up Beth Excel Worksheet Functions 3 May 27th 05 04:43 PM


All times are GMT +1. The time now is 02:35 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"