Trimming Data in Cell

geno335

Board Regular
Joined
Mar 8, 2006
Messages
50
How can I trim a certain number off of a string of data. For instance, I know about using the left and right functions, but what about if I want to remove, for instance, the first 6 characters from a string in a cell. How would you go about setting up that function?


ex- xxxxx- smith-xxxxxx-sss

and i want to be left with smith-xxxxxx-sss

or how about if i'm looking to get only the center part-
ex- xxxxx- smith-xxxxxx-sss

and i only want smith

Thanks.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,547
To remove the first 6 characters from a cell , do something like:
Code:
=RIGHT(A2,LEN(A2)-6)

Look at the MID function for getting parts from the middle of a string.
 

Forum statistics

Threads
1,136,619
Messages
5,676,847
Members
419,655
Latest member
pd2021vb

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
Top