PcMax
04-16-2012, 02:42 AM
Hi,
We are using the following code, run regularly in Excel 2003
The list includes only positive numbers: 12.625
While Excel 2007 does not show the same values ...
Any idea? How do I fix these codes?
Any advice is appreciated
'--- Dati -50
Sub Formula()
Dim x As Long
Dim Decurta As Double
Decurta = Sheets("Foglio1").Range("J1").Value
For x = 2 To Range("A" & Rows.Count).End(xlUp).Row
Cells(x, 8).Value = Cells(x, 3) - Decurta
Next
End Sub
'--------- 2 Dec.
Sub Decimali()
Dim x As String
'---Cerco i decimali nella colonna F e copio i valori nella colonna I
With Range("F2:F" & Range("F" & Rows.Count).End(xlUp).Row)
x = .Address
.Offset(, 3) = Evaluate("if(isnumber(" & x & "),round((" & "int(" & x & "* 100" & ")),0)/100," & x & ")")
End With
End Sub
It could be "round(" if the text language is not the same?
We are using the following code, run regularly in Excel 2003
The list includes only positive numbers: 12.625
While Excel 2007 does not show the same values ...
Any idea? How do I fix these codes?
Any advice is appreciated
'--- Dati -50
Sub Formula()
Dim x As Long
Dim Decurta As Double
Decurta = Sheets("Foglio1").Range("J1").Value
For x = 2 To Range("A" & Rows.Count).End(xlUp).Row
Cells(x, 8).Value = Cells(x, 3) - Decurta
Next
End Sub
'--------- 2 Dec.
Sub Decimali()
Dim x As String
'---Cerco i decimali nella colonna F e copio i valori nella colonna I
With Range("F2:F" & Range("F" & Rows.Count).End(xlUp).Row)
x = .Address
.Offset(, 3) = Evaluate("if(isnumber(" & x & "),round((" & "int(" & x & "* 100" & ")),0)/100," & x & ")")
End With
End Sub
It could be "round(" if the text language is not the same?