Remove quotation marks

J

Jeffrey

Is there a way to remove quotation marks from an Excel spreadsheet?

My file has looks like this:

"000151","001","SCREW-5/16-18 X 5/8 HEX CAP","A1"
"000922","001","SCREW-10-32X1/4 RHM-ZP"

But everything I try it I either get it to import but I loose the leading
00's (zero's) or it looks like this.

"000151" "001" "SCREW-5/16-18 X 5/8 HEX CAP" "A1"
"000922" "001" "SCREW-10-32X1/4 RHM-ZP" "A1"
"001085" "001" "NUT-3/8-16 HEX" "A1"

How do I get to import and get to look like this?

000151 001 SCREW-5/16-18 X 5/8 HEX CAP A1

I am using the Wizard in the Excel program.
 
D

Don Guillett

Format as Text and edit>replace " with nothing
or record a macro and clean it up as shown in fixtext

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 7/5/2008 by Donald B. Guillett
'

'
Columns("A:A").Select
Selection.NumberFormat = "@"
Selection.Replace What:="""", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub

Sub fixtext()
With Columns("A")
.NumberFormat = "@"
.Replace """", ""
End With
End Sub
 
D

Dave Peterson

I created a test file (plain old text) with your two lines of data in it.

I called it: C:\test.txt

I opened excel
I did File|Open|c:\test.txt
I was shown the text import wizard and I chose:
Delmited by comma

But I also told excel that each field should be treated as text (not General,
not a date, not skipped)

I got text values with leading 0's in my worksheet.
 
J

Jeffrey

Thanks that worked for me.
One more thing.
When I do this I get an error box, yellow triangle with a ! in it.
There are a number of items you can chose from, such as, number stored as
text or convert toa number, etc.

All of the numbers in the columns 1 and 2 has this error. How do I get rid
of these errors.
 
J

Jeffrey

Never mind I found the solution.

Jeffrey said:
Thanks that worked for me.
One more thing.
When I do this I get an error box, yellow triangle with a ! in it.
There are a number of items you can chose from, such as, number stored as
text or convert toa number, etc.

All of the numbers in the columns 1 and 2 has this error. How do I get rid
of these errors.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Scrabble Value calculation for Welsh words 0
schema.ini Pipe Delimited to Access Database 1
lookup with dropdown 4
Sequence number 9
Ranking 3
Missed Opportunity 3
Can this be done? 11
Transposing 0

Top