Trim function

Mr. Guy

New Member
Joined
Mar 24, 2002
Messages
18
I have some cells that look like this after using the concatenate function:
101-P T -200
102-L T -201
103-MOV-202

What I'm trying to do is get all the cells to display the tags with no spaces in them (like the MOV tag). I tried using the TRIM function but it leaves one space between the letters. Is there something similar to TRIM that would take all of the spaces out?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi Mr. Guy,
The answer is see columns "G" of following.
<CENTER><TABLE ALIGN=CENTER BORDER=1><TR><TD BGCOLOR=#0C266B COLSPAN=8><FONT COLOR=WHITE>Microsoft Excel - Trim function.xls</FONT></TD></TR><TR><TD BGCOLOR=#D4D0C8 COLSPAN=8>File(<U>F</U>) Edit(<U>E</U>) View(<U>V</U>) Insert(<U>I</U>) Tool(<U>T</U>) Data(<U>D</U>) Window(<U>W</U>) Help(<U>H</U>)</TD></TR><TR><TD ALIGN=CENTER COLSPAN=2 BGCOLOR=White>G4</TD><TD ALIGN=CENTER BGCOLOR=#D4D0C8>=</TD><TD COLSPAN=5 BGCOLOR=White>=SUBSTITUTE(F4," ","")</TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER> </TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>A</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>B</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>C</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>D</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>E</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>F</TD><TD BGCOLOR=#D4D0C8 ALIGN=CENTER>G</TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>1</TD><TD BGCOLOR=White> </TD><TD BGCOLOR=White> </TD><TD BGCOLOR=White> </TD><TD BGCOLOR=White> </TD><TD BGCOLOR=White> </TD><TD BGCOLOR=White> </TD><TD BGCOLOR=White>Answer is</TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>2</TD><TD BGCOLOR=White>101</TD><TD BGCOLOR=White>-</TD><TD BGCOLOR=White>P T </TD><TD BGCOLOR=White>-</TD><TD BGCOLOR=White>200</TD><TD BGCOLOR=White>=CONCATENATE(A2,B2,C2,D2,E2)</TD><TD BGCOLOR=White>=SUBSTITUTE(F2," ","")</TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>3</TD><TD BGCOLOR=White>102</TD><TD BGCOLOR=White>-</TD><TD BGCOLOR=White>L T</TD><TD BGCOLOR=White>-</TD><TD BGCOLOR=White>201</TD><TD BGCOLOR=White>=CONCATENATE(A3,B3,C3,D3,E3)</TD><TD BGCOLOR=White>=SUBSTITUTE(F3," ","")</TD></TR><TR><TD WIDTH=5 BGCOLOR=#D4D0C8 ALIGN=CENTER>4</TD><TD BGCOLOR=White>103</TD><TD BGCOLOR=White>-</TD><TD BGCOLOR=White>MOV</TD><TD BGCOLOR=White>-</TD><TD BGCOLOR=White>202</TD><TD BGCOLOR=White>=CONCATENATE(A4,B4,C4,D4,E4)</TD><TD BGCOLOR=White>=SUBSTITUTE(F4," ","")</TD></TR></TABLE></CENTER>
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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