1
1
I have an Excel spreadsheet.
In column A there are some words. In some cases there are multiple words in one cell, separated by decimal points (periods); e.g., university.of.california
or school.house
. Whatever comes after the first point, including the point itself, should be ignored; e.g., university.of.california
should be treated as if it were just university
.
In columns B to R there are trigraphs – groups of three letters each. But there are also blank cells in these columns.
I want to check whether the trigraphs in columns B to R
appear within the (first) word in column A of the same line.
For example, if columns A-F in some row contain
university.of.california
, cal
, rev
, sit
, uni
and uny
,
that row should count as 2,
because uni
and sit
appear within university
.
cal
doesn’t count because california
comes after a period,
rev
doesn’t count because it’s ver
in the wrong order,
and uny
doesn’t count because the letters u
, n
and y
do not occur together in university
.
I want column U in each row to indicate the number of trigraphs in columns B through R in that row that match the first word in column A. How can I do that?
And which formula to use in column T, so it is TRUE (in green) if U is equal or higher than 1 match found in that line and FALSE (not colored) if U is 0 in that row?
Here's an example data set. As described above, columns A through R contain input data that will be provided. Columns T and U contain the results that I want Excel to create from that input. In this example, cell T6 is true because "ice" exists before the first point and U6 is 1 because that’s the only match before first point, once "hou" and "col" exist only after the first point, so were ignored (in red). In the photo, the yellow are the correct matches to be considered.
+---+--------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---+-------+---+
| | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U |
+---+--------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---+-------+---+
| 1 | university | abd | ity | sfd | fgh | tyu | kjg | sdf | jhg | bnm | hjk | | | | | | | | | TRUE | 1 |
| 2 | school | bnm | sdf | hoo | tyu | kjg | sdf | jhg | ool | hjk | sdf | fgh | tyu | kjg | sch | jhg | bnm | hjk | | TRUE | 3 |
| 3 | college | sdf | fgh | tyu | kjg | sdf | jhg | bnm | sdf | fgh | tyu | kjg | sdf | jhg | bnm | hjk | | | | FALSE | 0 |
| 4 | home | ome | fgh | tyu | kjg | sdf | jhg | | | | | | | | | | | | | TRUE | 1 |
| 5 | nice.colored.house | hou | col | ice | | | | | | | | | | | | | | | | TRUE | 1 |
| 6 | super.market | etr | etr | sdf | fsd | sdf | iuj | mar | ket | | | | | | | | | | | FALSE | 0 |
+---+--------------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ +-------+---+
Here are the same data (possibly including transcription errors) with color coding for illumination, as described above:
If possible the formula should be case insensitive.
For example, ooL
and OOL
should count as matches for school
.
Hello Scott, your answer is very perfect, thanks a lot. Only had one issue in here, after all done, I made the conditional formatting for putting the green color to the true values, and then I asked the filter to organize all the column U from bigger to lower numbers expanding to the other columns, it is not doing it correctly, would it be because I used the Sheet2 formulas as paralell? Should I do something else for it to do this correctly? Thanks – Joao – 2018-01-26T03:49:17.780
OK, I fixed it. – Scott – 2018-01-28T23:41:11.717