asdafgafawaaa
New Member
- Joined
- Jun 23, 2017
- Messages
- 19
Hi,
One small section of VBA code doesn't work for the "−", this is not a regular dash.
I use the ASC function to get the ASCII code which is chr(45), then use the replace function to replace with "" so as to remove it. But it doesn't work at all, can anyone help me with this, much appreciate it!
For example for number 9999999−6 at A2, I want to put the new value at B2.
Sub test()
Range("B2")=replace(range("A2"),CHR(45),"")
End Sub
Thank you very much!
Jack
One small section of VBA code doesn't work for the "−", this is not a regular dash.
I use the ASC function to get the ASCII code which is chr(45), then use the replace function to replace with "" so as to remove it. But it doesn't work at all, can anyone help me with this, much appreciate it!
For example for number 9999999−6 at A2, I want to put the new value at B2.
Sub test()
Range("B2")=replace(range("A2"),CHR(45),"")
End Sub
Thank you very much!
Jack