Clip text to n characters

  • Thread starter Thread starter David H
  • Start date Start date
D

David H

Hi

I have a column of text of variable length (no. of chars) Which function
can I use to create a column using, say, the first 20 characters of each
cell?

David
 
Use the function MID

=MID(TextLocation,StartNumber,Number of Characters)

To get the first 20 characters of cell C1 use
=MID(C1,1,20)
 
MID would be mostly used if you want something in the middle of the string.

For something like that, I would go with:
=LEFT(C1,20)
which will grab the first 20 characters of the string in cell C1
 
Select the column and do Data / text to Columns / Fixed width - Set the
break at 20 characters and choose 'Do not import' for the second column of
data within the wizard. Drag out any superfluous breaks first though.
 
Back
Top