Subscribe Bookmark RSS Feed

examples of column formula loops

vincent_kane

New Contributor

Joined:

Jun 28, 2016

Trying to ID 9 character words in column :Trim & Case with the following formula

For( i = 1, i < 20, i++,

If( Word((i, Length( :Name( "Trim & Case" ) ) == 9),

  Word( i, :Name( "Trim & Case" ) ),

  ""

)

)

2 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

Try this formula:

word_list = Words(:Name("Trim & Case"), " ");

word9s    = "";

for (i = 1, i <= nitems(word_list), i++,

      if (length(word_list[i]) == 9,

            if (word9s == "",

                  word9s = word_list[i];

                  ,

                  word9s = word9s || "," || word_list[i];

            );

      );

);

word9s;

vincent_kane

New Contributor

Joined:

Jun 28, 2016

Works well.   Thanks. Much better than mine