How do you conditionally format the last occurrence of a word from a column list of words in Google Sheet?
This example shows the desired outcome.
The column to be formulated is a single column and is dynamically growing. It contains empty cells in between non-empty cells. The list of words will either come from a single column, separated by cells, and dynamically growing, or manually inputted in the Conditional Formatting UI.
You may try:
=and(xmatch(A1,D:D),countif(A$1:A1,A1)=countif(A:A,A1))
Addressing this part of the question:
come from a single column, separated by cells
You can, for example, in E2
input
=max(filter(row(A:A),A:A=D2))
and then in Conditional Formatting for the whole Column A input custom formula
=and($A1=$D$2,row($A1)=$E$2)
Then this part of the question
and dynamically growing
For searching a list of multiple keywords, the easiest would be to drag the formula in Column E to E4
and then in Conditional Formatting, input custom formula
=and(match($A1,$D$2:$D,0),match(row($A1),$E$2:$E,0))
If your list of search words grows frequently, you can in E2
input the following formula instead
=map(D2:D,lambda(c,if(c<>"",max(filter(row(A:A),A:A=c)),)))
This route is not the most succinct but should avoid slowing your sheet down by repeatedly checking for matching words in the column of search. (since the whole column matching is done only once per word.)
2