Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Decimal problems

I have found that IsNumeric is not too reliable, although not in the context
of non-US settings. You might try this instead:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G:G")) Is Nothing Then
If Not Application.IsText(ActiveCell.Value) Then
If Left(ActiveCell.Formula, 1) < "=" Then
Application.EnableEvents = False
ActiveCell.Formula = "=" & ActiveCell.Value
Application.EnableEvents = True
End If
End If
End If
End Sub


--
Jim
"excelent" wrote in message
...
| This kode works fine when i put integer numbers like 1 or 11 or 13
| in column G, but if i put 1,1 or 1,11 or 12,2 it return an error why ?
| (Excell 2003 DK) by the way input like 1.1 (1 dot 1) is text in DK way
|
| Private Sub Worksheet_Change(ByVal Target As Range)
| If Intersect(Target, Range("G:G")) Is Nothing Then Exit Sub
| If IsNumeric(Target) Then Target = "=" & Target
| End Sub
|


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
Localisation decimal problems Mats Samson Excel Programming 2 February 18th 06 03:25 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. SUKYKITTY Excel Discussion (Misc queries) 3 July 6th 05 01:50 PM


All times are GMT +1. The time now is 10:50 AM.

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"