Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a column that has cells with more than 30 characters. I need to truncate this data to 30 characters max is there a formula that I can use to delete this excess data?

thanks

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted
=LEFT(reference, max_chars)

For example,

=LEFT(A1, 30)

Similarly, RIGHT() truncates from the other direction and MID() allows you to select from the middle of a string. LEN() (the length of a string) is sometimes handy in conjunction with these other functions.

share|improve this answer
2  
One step further to the answer above. After entering that formula in the first cell adjacent to the value you want to fix... copy the cell down the entire data set. Then COPY the column of new value and click on the original column and do a PASTE SPECIAL > VALUES. This will make the change permanent in the original cells. Then you can delete the helper column you used above. –  Jerry Beaucaire Jun 30 '12 at 17:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.