View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Is it possible to emulate a ten-key entry in Excel?

Garth

Try this event code which divides any number entered in Column B by 100

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Target.Cells.Column = 2 Then
If Not IsNumeric(Target.Value) Then Exit Sub
Application.EnableEvents = False
With Target
.Value = .Value / 100

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

On Mon, 27 Nov 2006 09:20:02 -0800, Garth Hales
wrote:

Gord;

This works but makes the change apply to all spreadsheets. I can live with
that but would really like to have the emulation apply only to the current
spreadsheet or ideally to only a column. Any ideas?

Thanks again,

Garth Hales

"Gord Dibben" wrote:

Garth

ToolsOptionsEdit.

Check "Fixed Decimal Places" and set for 2

Enter 1234 returns 12.34


Gord Dibben MS Excel MVP


On Mon, 20 Nov 2006 18:28:02 -0800, Garth Hales
wrote:

I want to set up a quick entry system in one column of a spread sheet. It
should act like the old ten-key calculator or adding machine set for
accounting style entry - that is all entries are assumed to end in two
decimal places, eliminating the typing of the decimal point itself.




Gord Dibben MS Excel MVP