Clean & Trim Commands

fvisions

Board Regular
Joined
Jul 29, 2008
Messages
191
Office Version
  1. 365
Platform
  1. Windows
Excel 2007, how do you write the clean or trim command into a spreadsheet? I am trying to remove the leading space in a column and excel help menu is no help.

Where do i type =trim or =clean in the cell above the data or in the cell with the data?

Header: col A Row 1= Supervisor
Data: Col A Row 2-2,000 = Supervisor's name list (with a leading space)
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
If neither clean or trim are removing the leading space it sounds like you have a char(160) problem.

=trim(clean(substitute(a2,char(160),"")))
 
Upvote 0
Put this in column B next to the cell and use:

=trim(A2)

Then copy all the way down and then copy and past values over column A.

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,214,422
Messages
6,119,395
Members
448,891
Latest member
tpierce

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