Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rounding with "." decimals
#1
Not Solved
Hi, I notice that round only works with ",", if the decimal part is separated with "." it doesn´t work.

Round(100.0)=1000

Is there any function that works with both decimal systems? And a function that works with "."?

Thanks
Reply
#2
Not Solved
Hi pjeigenn,
I did not understand your question?
Rounding decimal should work, and the syntax is like this:
Round(expression[, numdecimalplaces])
Ex:
tt=Round(100.456) 'tt contains now 100
tt=Round(100.456, 2) 'tt contains now 100.46
Reply
#3
Not Solved
Round works correctly for both "," and "." depending on the regional setting of the system. check your regional setting at Control panel.

Reply
#4
Not Solved
Hi Saket,
I have changed the regional setting to Spanish, but it did not work for me, how should be the syntax for that?
I have tried with following, it gives me syntax error.
tt=Round(123456789,1234) 'here ',' works as decimal
msgbox tt
Reply
#5
Not Solved
as I can remeber, there are some other settings too. I will see if I can get that.
may be pjeigenn can help us, to get it quickly.

Reply
#6
Not Solved
I am looking for the settings you said, I have windows 7.
With "," it works properly, for "." it doesn´t.
If I manage to solve the problem i will post the solution...
----------------------------------------------------------
I am looking my problem, and it is weird.
round(100.0)=100 -> It works properly

Code:
v_MontoAdhesion=Browser("Browser").Page("Page_10").WebTable("Empresa").GetCellData(filas-2,4) =" 100.0"
v_MontoAdhesion=trim(Browser("Browser").Page("Page_10").WebTable("Empresa").GetCellData(filas-2,4))= "100.0"
round(v_MontoAdhesion)=1000 -> ¿?
int(v_MontoAdhesion)=1000
round(int(v_MontoAdhesion))=1000

Don´t know what´s going on
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)