P
P
Pavel Pavel2021-06-07 14:21:01
excel
Pavel Pavel, 2021-06-07 14:21:01

How to group words by repetition?

There are many cells in one column containing 2-4 words, where one of the words is repeated either in full occurrence or with a different ending.
For example:
package small
package medium buy
buy packages cheap
packages medium wholesale

There are a lot of such lines, you can sort them out with sorting pointing to repetitions without endings manually, but it seems to me that this is solved differently. Is it possible to make cells grouped if they contain at least 2 identical words with inexact occurrence (so that words with different endings are taken into account)?
upd. Added an example. Regarding the example, out of 4 cells, 2 and 4 should be grouped, because they have 2 occurrences with different endings - "package" and "medium".

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DENIS Kokorev, 2021-06-07
@shmaroder

Write a script in vba. No other way.

B
BasiC2k, 2021-06-07
@BasiC2k

The task can be divided into stages:
1. Extracting all unique words, compiling a list from them;
2. Search in the main list for a specific word (if it contains ..., then ...);
3. Subtract a letter from the word, repeat the search in the main list.
And so on, until the letters and words run out. Theoretically, in paragraph 3, you can do a spelling dictionary check, but this is justified if this task is often performed.
And it is best to do this not in VBA, but in another PL + database, in several threads.
Otherwise it will be sooo slow.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question