Wednesday, 11 September 2013

Trimming cells to a specified text length

By , Director, Naturally Sales Ltd.

Today we’ll look at how to automatically trim cells and discard anything over a certain length.
 

We do this with the LEFT function. It's constructed like this:

    =LEFT(cell_ref,no_of_characters)


...and will preserve only the specified number of characters from the cell. In "real life", we can preserve only the left 10 characters from cell A1 by entering :

    =LEFT(A1,10)

Why not play with the RIGHT function as well?

Next time, we'll look at how we can prevent our users from entering too many characters to start with, therefore saving ourselves some time cleaning up data.

No comments:

Post a comment