# Trimming Excel entries down to just the four first digits



## magd1420 (Nov 2, 2005)

Hi,

I've got a spreadsheet column containing long strings of ID codes (of varying lengths) and only want to keep the first four digits in each field, deleting the rest. 

I can't find any easy way of doing this automatically, and I've got thousands of entries to fix,

Help!


----------



## maxflia10 (Feb 25, 2003)

You could try the LEFT function,

=LEFT(A1,4) 

and drag down, copy, then Paste Special.

Or Data/Text to Column and tick fixed Width.


----------



## bomb #21 (Jul 1, 2005)

Hi. In a spare column, use something like:

=LEFT(A1,4)

, then drag this down as far as you need.

When done, select the whole column (CTRL+Spacebar) and copy (CTRL+C). Then Edit -- Paste Special -- Values -- OK.


----------



## Anne Troy (Feb 14, 1999)

You can use Data-->Text to columns on the column, too.
http://www.officearticles.com/excel/best_tips_for_using_microsoft_excel.htm


----------

