Ask Your Question

How can I sort/order rows by number of words in each row

asked 2020-06-19 09:13:51 +0100

AcornTree1 gravatar image

updated 2020-08-02 02:19:24 +0100

Alex Kemp gravatar image

Each row has a number of words. I want them sorted by row with least number of words to highest.

edit retag flag offensive close merge delete



What "row has a number of words" means exactly? Several cells with one word per cell? a sentence of variable length in a cell/multiple cells? empty cells in the middle possible?

Mike Kaganski gravatar imageMike Kaganski ( 2020-06-19 09:21:21 +0100 )edit

*Unsorted *

  1. be the first
  2. today is
  3. up
  4. make some bread this evening
  5. bay town

List Reordered by number of words in each row:

  1. up
  2. today is
  3. bay town
  4. be the first
  5. make some bread this evening

Hope this is clearer

AcornTree1 gravatar imageAcornTree1 ( 2020-06-19 13:27:14 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2020-06-19 14:42:15 +0100

gregors15 gravatar image

Hi try the following, =LEN(A3)-LEN(SUBSTITUTE(A3," ", )) this will give the number blanks in the cell, which you can then sort on. See attached C:\fakepath\LOQ_20200619a.ods

edit flag offensive delete link more

answered 2020-06-19 17:35:48 +0100

AcornTree1 gravatar image


Thank you so much. Works perfectly!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-06-19 09:13:51 +0100

Seen: 78 times

Last updated: Jun 19 '20