We help IT Professionals succeed at work.

# Maximum character count in a column

on
Is there a way to get the MAXIMUM character count of any cell in a column?  In other words if the worksheet looked like this...  The result would be:

Comment
Watch Question

## View Solutions Only

Commented:
Create a Column on the right of each one with length(cell), last cell is max(cells).

Commented:
I don't understand.

Commented:
I'll be back with an example in 10 minutes.

Commented:
Most Valuable Expert 2013

Commented:

Hopefully, you can extrapolate what the other cells should be:

Column D is the length of A, Column E is the length of B, Column F is the length of C.  "cell" represents the cell reference - a1, a2, b3, c2, etc)

Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015
Commented:

Considering your sample data, you may try something like this...

In A4

`=MAX(INDEX(LEN(A1:A3),))`

and then copy it across.

Expert of the Year 2019
Top Expert 2016
Commented:
No need for a new column, just do something like this:

=MAX(LEN(A2:A4))

And then enter that as an array formula using SHIFT-CONTROL-ENTER.

»bp
"There is still no cure for the common birthday." ~John Glenn
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
Here is a VBA solution. Click the gray button.
29172575.xlsm
"There is still no cure for the common birthday." ~John Glenn
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I’m glad I was able to help.

If you expand the “Full Biography" section of my profile you’ll find links to some articles I’ve written that may interest you.

Marty - Microsoft MVP 2009 to 2017
Experts Exchange Most Valuable Expert (MVE) 2015, 2017
Experts Exchange Top Expert Visual Basic Classic 2012 to 2019
Experts Exchange Top Expert VBA 2018, 2019
Experts Exchange Distinguished Expert in Excel 2018