Importing problem

nana2six

New Member
Joined
May 9, 2005
Messages
2
I am trying to import information into a new excel file. The original information is a series of numbers separated by dashes. I want all of the numbers, none of the dashes but I want to keep the zeros. Everything I try dumps the zeros.

Example: 3-0573-0188-03-6
Desired result: 305730188036

Any ideas?

Thanks!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
nana2six said:
I am trying to import information into a new excel file. The original information is a series of numbers separated by dashes. I want all of the numbers, none of the dashes but I want to keep the zeros. Everything I try dumps the zeros.

Example: 3-0573-0188-03-6
Desired result: 305730188036

Any ideas?

Thanks!
Have you tried the replace feature?

go to edit replace:
replace what -

replace with: "leave this blank"
 
Upvote 0
The Find and Replace does not work, it does not leave it the way it is needed.

The original file looks like this:

3-0573-0188-03-6

and this is the desired result:

305730188036

Any other ideas?
 
Upvote 0
Hi, try this:

cell A1 = "3-05......" create a macro with:

cVar=split(range("A1").value,"-")
for nI=0 to ubound(cVar)-1
cResult=cResult & cVar(nI)
next
range("A2").value=cResult

Ok ?
 
Upvote 0
Hmmm,

I just tried the replace feature with this: 3-0573-0188-03-6



and it returned this: 305730188036
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top