Remove extra space

klynshoe

Board Regular
Joined
Jun 17, 2010
Messages
176
Hello,

I have a large data set where there is an extra space at the end of every line causing my vlookups to not work. You can't see them in the data listed below, but is there any easy way to remove the spaces only at the end of each line?

<TABLE style="WIDTH: 219pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=292 border=0><COLGROUP><COL style="WIDTH: 219pt; mso-width-source: userset; mso-width-alt: 10678" width=292><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 219pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" width=292 height=20>GM-GME_GPF-Managers</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Managers</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt 2</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt 2</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt 2</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>GM-GME_GPF-Prime Client Mgmt 2</TD></TR></TBODY></TABLE>

USING EXCEL 2007
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Highlight that column, use Text-To-Columns, click Finish.
 
Upvote 0
If you use that method in the Text To Column make sure you select the Next button at the bottom and select the Delimeters space option then click finish
 
Upvote 0
If you use that method in the Text To Column make sure you select the Next button at the bottom and select the Delimeters space option then click finish

Actually, don't need to do that. ;)

Text-to-columns will trim off leading and trailing spaces automatically.
 
Upvote 0
I tried that but it didn't remove the spaces in 2007. so I went the extra steps, as long as it works I would be prepared to do the extra steps.

I do agree that it should do it straight away.....;)
 
Upvote 0
I tried that but it didn't remove the spaces in 2007. so I went the extra steps, as long as it works I would be prepared to do the extra steps.

I do agree that it should do it straight away.....;)

Gotcha

Strange that it drops the spaces in 2003, and not in 2007. :confused:
 
Upvote 0
Would you please clarify the extra steps?

I highlighted the entire column, went to Text to Columns, clicked Next, selected "Treat consecutive delimiters as one" and clicked Finish. Nothing happened.

USING EXCEL 2007
 
Upvote 0
As you go through each step:

Select Column
Select the Data Tab
Click the Text to Columns feature
Click Next as Delimited is first step
Next select Space remove tick from Tab
Click Next or Finish
If Clicked Next then Click Finish
 
Upvote 0
This doesn't do anything. Should anything be selected on step 2 where the delimiters are listed?

USING EXCEL 2007
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,702
Members
452,938
Latest member
babeneker

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