Excel Max Length of each column data

Andrew picture Andrew · Nov 25, 2016 · Viewed 19.7k times · Source

Simple one for someone hopefully. I'm trying to get the max length of each column in an excel sheet but it doesn't seem to be working now. I was using =MAX(LEN(A2:A200)) for example and because MAX is not an "official" formula but is still there you seem to have to press CTRL + ALT + SHIFT once you have finished typing it.

When I do this it puts curly brackets round the whole formula like this {=MAX(LEN(A2:A200))} but if I click into the cell they disappear. the length of the first column will appear but then if I autofill to the next column it shows same length of column data from the first column rather than calculating the next column.

Perhaps not a straight up programming question but scratching my head why this is not working now. I'm trying to show max length of each column above header column in new row.

Thanks

Andrew

Answer

Gary's Student picture Gary's Student · Nov 25, 2016

In A1 enter the array formula:

=MAX(LEN(A2:A200))

then stop clicking.

Move to A1 with the ARROW keys. Touch Ctrl+c. Then paste to B2 through G2 using Ctrl+v:

enter image description here

This will put the array formula in the destination cells.