Convert number to text format VBA
Solved
ph412
Posted messages
49
Status
Member
-
ph412 Posted messages 49 Status Member -
ph412 Posted messages 49 Status Member -
Hello,
I’m looking to convert a number into text format.
I’ve searched a lot of forums and every time I keep getting the same result:
I can transform most of my numbers but not all of them: let me explain
The number 5.5 will become 5.5 in text
but the number 2.375 will become 2375 and in numbers
So it considers the comma (only in the second case) as a thousand separator and doesn’t change its format...
It’s incomprehensible
For this, I use the following loop twice:
For a = 2 To 25
Worksheets("XX").Range("AI" & a).Select
Worksheets("XX").Range("AI" & a) = "" & Worksheets("XX").Range("AI" & a)
Next
But I’ve tried with CStr() and it’s the same
Thank you very much to the community!
I’m looking to convert a number into text format.
I’ve searched a lot of forums and every time I keep getting the same result:
I can transform most of my numbers but not all of them: let me explain
The number 5.5 will become 5.5 in text
but the number 2.375 will become 2375 and in numbers
So it considers the comma (only in the second case) as a thousand separator and doesn’t change its format...
It’s incomprehensible
For this, I use the following loop twice:
For a = 2 To 25
Worksheets("XX").Range("AI" & a).Select
Worksheets("XX").Range("AI" & a) = "" & Worksheets("XX").Range("AI" & a)
Next
But I’ve tried with CStr() and it’s the same
Thank you very much to the community!
Thanks, it works well but I would like to have the label "Number Stored as Text" that appears once I have made this transformation and that's what I want to obtain without my separator issue.