Why convert a string with , to double will always return 1
ie
cdbl(1,524.22) return 1
Thanks
Teo
Why convert a string with , to double will always return 1
ie
cdbl(1,524.22) return 1
Thanks
Teo
CDbl()
only works on strings that that can be converted to numbers. Number strings with commas in them are not numbers and cannot be directly converted to a number. If you want to use CDbl()
as in your example, first remove any commas using the Replace()
function:
CDbl(Replace("1,524.22", ",", ""))
Kind regards,
Doug