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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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.
 
Upvote 0

Forum statistics

Threads
1,215,633
Messages
6,125,929
Members
449,274
Latest member
mrcsbenson

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