<< Click here to Goto HomePage


Tuesday, April 03, 2007

Excel Tip :: How to perform Character Count in a cell in Excel

If you have a cell containing a text string, you can count and display the number of characters (including spaces) in that cell. You do this by entering the formula
=LEN(cell containing string) in a blank cell.

For example, enter the formula =LEN(A1) in cell B1. The number of characters in cell A1 appears in cell B1.

This is particular useful when you have a column containing a lengthy list of text strings. You can copy the above formula into adjacent cells by using the fill handle (the small black square in the lower-right corner of the selected cell). Select the cell that contains the formula, and then drag the fill handle over the range you want to fill.

For example, you want to know the number of characters in the cell range A1:A100. Enter the formula =LEN(A1) in cell B1, select B1, and then drag the fill handle down to cell B100. The numbers of characters in cells A1:A100 appear in the corresponding cells in the cell range B1:B100.

Important note: LEN is intended for use with languages that use a single-byte character set (SBCS). Use the formula LENB for languages that use a double-byte character set (DBCS).


  1. Anonymous said,

    This is pretty awesome. I've been trying to figure this out forever.

    on 12/11/2010 12:38 AM