Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I should know this...but hey it's Monday!

Status
Not open for further replies.

Lorimare

MIS
Dec 9, 2003
24
0
0
US
I have this number: 00034-1019-01

I want to remove the dashes. Do I use TRIM function, and if so could you supply the verbage?

Thank you
 
Use Replace
[blue][tt]
NoDashes = Replace ( "00034-1019-01", "-", "" )
[/tt][/blue]
 
I have to do this for 256 rows of numbers with similar formatting. I should probably use the LEFT or RIGHT function.
 
I suppose you could
[blue][tt]
NoDashes = Left$( myValue, 5 ) & Mid$(myValue, 7, 4) & Right$( myValue, 2 )
[/tt][/blue]
but Replace does seem more compact.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top