Remove Spaces

Manny74

Board Regular
Joined
May 6, 2016
Messages
124
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All,

My data is supposed to look a certain way ( see below)

I need to remove spaces between D, the ID # (for example DXH110817) and the last name Doe.

I'm trying to find an efficient fast way of doing this since I have about 50 records in my data.

Any suggestions?

So right now, it looks like this:

D DXH110817 DOE JOHN
D RXP011916 DOE JANE
D 173616018 DOE JAKE

But it should look like this:
DDXH110817DOEJOHN
DRXP011916DOEJANE
D173616018DOEJAKE

<tbody>
</tbody><colgroup><col><col></colgroup>

<tbody>
</tbody><colgroup><col><col><col><col></colgroup>
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi, Are the Columns/Rows of data going to be static or variable? Also is there any other data within the sheet?
 
Upvote 0
Hi,

If your data is Always in the structure as your samples, you can use this formula:


Book1
AB
1D DXH110817 DOE JOHNDDXH110817DOE JOHN
2D RXP011916 DOE JANEDRXP011916DOE JANE
3D 173616018 DOE JAKED173616018DOE JAKE
Sheet65
Cell Formulas
RangeFormula
B1=SUBSTITUTE(SUBSTITUTE(A1," ","",1)," ","",1)
 
Upvote 0
I believe static.

So the data looks like this:

DDXH110817DOEJOHNX2017110806Z20.620171213958577066XHV
DRXP011916DOEJANEX2016011906Z20.620171017954772357XHV
D173616018DOEJUDEL2015032706Z2120170403953854210XHV
DAEO110613DOEJILLE2013110606B2020150922952860686XHV

<tbody>
</tbody><colgroup><col span="2"><col><col><col span="2"><col><col><col span="2"><col></colgroup>
 
Upvote 0
And it should look like this:

DDXH110817DOEJOHNX2017110806Z20.620171213958577066XHV
DRXP011916DOEJANEX2016011906Z20.620171017954772357XHV
D173616018DOEJUDEL2015032706Z2120170403953854210XHV
DAEO110613DOEJILLE2013110606B2020150922952860686XHV

<tbody>
</tbody><colgroup><col><col><col><col><col></colgroup>
 
Upvote 0
Is each line of data string in ONE cell?
 
Upvote 0
The data looks like this:

AB CDEFGHIJK
DDXH110817 DOEJOHNX2017110806Z20.620171213958577066XHV
DRXP011916 DOEJANEX2016011906Z20.620171017954772357XHV
D173616018 DOEJUDEL2015032706Z2120170403953854210XHV
DAEO110613 DOEJILLE2013110606B2020150922952860686XHV

<tbody>
</tbody><colgroup><col><col><col><col><col><col span="3"><col span="3"></colgroup>
 
Upvote 0
Are you looking to REPLACE the original data as the way you show in Post #5 ?
Or, can we place the NEW modified string in other Columns/Cells?
Also, the way you want the results in Post #5 , is that each line in ONE cell, or are they in separate Columns?

Are you looking for Formula, or VBA?
 
Upvote 0
Are you looking to REPLACE the original data as the way you show in Post #5 ?
Or, can we place the NEW modified string in other Columns/Cells?
Also, the way you want the results in Post #5 , is that each line in ONE cell, or are they in separate Columns?

Are you looking for Formula, or VBA?

I'm looking to remove spaces in between columns (cells).....
I'm going from 11 columns to about 5 columns....
I'm looking for a formula...
 
Upvote 0
Then it's pretty straight forward:


Book1
ABCDEFGHIJKLMNOP
1DDXH110817DOEJOHNX201711086Z20.620171213958577066XHVDDXH110817DOE JOHNX201711086Z20.620171213958577066XHV
2DRXP011916DOEJANEX201601196Z20.620171017954772357XHVDRXP011916DOE JANEX201601196Z20.620171017954772357XHV
3D173616018DOEJUDEL201503276Z2120170403953854210XHVD173616018DOE JUDEL201503276Z2120170403953854210XHV
4DAEO110613DOEJILLE201311066B2020150922952860686XHVDAEO110613DOE JILLE201311066B2020150922952860686XHV
Sheet65
Cell Formulas
RangeFormula
M1=CONCATENATE(A1,B1,C1," ",D1)
N1=E1&F1&G1&H1
O1=I1
P1=J1&K1


Formulas copied down.
 
Upvote 0

Forum statistics

Threads
1,215,606
Messages
6,125,800
Members
449,261
Latest member
Rachel812321

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