Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

how to sort column by number of characters per cell ?

  Asked By: Everett    Date: Oct 06    Category: MS Office    Views: 741
  

how can i sort column by number of characters per cell like this
z
yy
fff
oooo
hhhhh
i try this solution :
i use the the len function in the near column (b) to count the
characters in column(a) and i sort column(b) A-z
but this is not practical solution

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jessica Brown     Answered On: Oct 06

I doubt that there's any other way to do it without writing a sort
subroutine.

If you don't want to see the helper column, you can always hide it.

 
Answer #2    Answered By: Tia Hughes     Answered On: Oct 06

If adding a len() function  to a column  is not "practical"
how can writing a full VBA sub be considered more "practical"?

If I WERE to suggest writing a sub... I'd suggest
storing the data in an array, sorting the array, then
write the array back to the cells...

Or, you could automate your original solution.
have the script write the len() function to the (B) column,
sort the data, delete the (B) column...

 
Didn't find what you were looking for? Find more on how to sort column by number of characters per cell ? Or get search suggestion and latest updates.




Tagged: