I have two computers and when I open the same Excel on both of them, they display different numbers. It looks like this:
First one shows number 135.05
while the other shows 135.059.003.051.757,00
. Both PC’s have the same settings which are like this:
Does anyone knows of any other settings that might mess things up for me?
In the background there are a lot of macros running and I think this one might cause problems. It is called whenever worksheet is changed or activated or opened at the start. Task of this macro is to convert “number stored as string”:
Public Function remove_numbers_formated_as_text(ByVal sh As Worksheet)
Dim r As Range
Dim arr As Variant
Dim i As Long '''' arr's rows
Dim j As Long '''' arr's columns
Dim s As String
Dim b As Boolean
Set r = sh.ListObjects(1).DataBodyRange
arr = r.Formula2
'''' Iterate over a whole row and then proceed to next column
For i = 1 To UBound(arr)
For j = 1 To UBound(arr, 2)
If IsEmpty(arr(i, j)) = False Then
'''' Check whether array mamber stores formula
b = r(i, j).HasFormula
If b = True Then GoTo A
'''' If cell doesn't treat numbers as text and is a numeric value,
'''' then this is definitely a measurement that somebody entered and
'''' it is therefore converted to double.
s = r(i, j).NumberFormat
If IsNumeric(arr(i, j)) And s <> "@" Then
arr(i, j) = CDbl(arr(i, j))
End If
End If
A:
Next
Next
r.Formula2 = arr
End Function