csehz
asked on
VBA Excel 2000 - Replace
Dear Experts,
Could you please have look the attached file, basically its A column is a download from an outer system.
You can see for example in cells A4 or A20, that the download saved the quantities in such format
1.774,000
5.100,000
My target would be to replace the "." characters so getting
1774
5100
Basically I have a macro which I assume should do it, but this creates the cell values like 1774000 and 5100000 on the example
Sub SimpleReplaceInColumn()
[A:A].Replace ".", vbNullString
End Sub
Could you please advise how this code should be modified to bring the quantities according to the target? It is interesting because selecting menu Edit/Replace and Find what "." to replace with nothing, that works
thanks,
Download.xls
Could you please have look the attached file, basically its A column is a download from an outer system.
You can see for example in cells A4 or A20, that the download saved the quantities in such format
1.774,000
5.100,000
My target would be to replace the "." characters so getting
1774
5100
Basically I have a macro which I assume should do it, but this creates the cell values like 1774000 and 5100000 on the example
Sub SimpleReplaceInColumn()
[A:A].Replace ".", vbNullString
End Sub
Could you please advise how this code should be modified to bring the quantities according to the target? It is interesting because selecting menu Edit/Replace and Find what "." to replace with nothing, that works
thanks,
Download.xls
does everything end with ,000?
-Brandon
-Brandon
ASKER
Brandon no, the download save logic seems that if the quantity is less than 1000, those are as numbers without "."
But if the quantity is greater or equal than 1000, for those the pattern is 1.000,000. So using "." for thousands, "," for decimals.
But if the quantity is greater or equal than 1000, for those the pattern is 1.000,000. So using "." for thousands, "," for decimals.
ASKER
I assume your question is whether for sure all quantity has always ,000 as decimal, in this example yes but can not guarantee that in all download such would be
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That works perfectly :-) You are amazing thanks very much your help.
On my machine even the 1.774,123 example brought 1774,123 which is correct
On my machine even the 1.774,123 example brought 1774,123 which is correct
csehz - Glad it worked.
ASKER
Also attached now a picture about the problem
thanks,
Download.jpg