Wednesday, February 11, 2009

HOW TO Excel: Cut the last [x] characters from every cell in a list.


=LEFT(x,LEN(x)-y)

x is the cell where the information you want to trim is stored. y is the number of characters you want to trim. In plain English: "Take what's in the first cell; then, starting from the Left, return a number of characters equal to the entire length of that cell minus y."


Example: Let's say you've imported a list of movies from your hard drive.

But all you want is the names of the movies - you don't want the year or the .avi. That's 11 characters (1 space, 1 open paren, a four-digit year, 1 close paren, and ".avi"). By entering =LEFT(A1,LEN(A1)-11) into B1, you'll get this:


Then Copy and Paste the formula in B1 all the way down your list to complete the change.

0 comments: