Oct 30 2022 06:51 AM
I created a script in excel in which the host's monologs (among other things) are written in Column D. Above each monolog, "HOST" is written as an indicator. I was hoping to extract every note in Column D except "HOST" while using the FILTER/LEN Formula.
Is this possible
Oct 30 2022 07:09 AM
Oct 30 2022 08:11 AM - edited Oct 30 2022 08:20 AM
Thank you. This works great for this script because none of the other cells in column D had 4 characters. I can see other great purposes for this formula too!
But if there were other 4 letter words or if by chance I wanted to expend upon this, let's say it was a three word phrase like "Refer to Blocking" that I did not want to extract, yet there were other phrases that had the same character count... how would I differentiate the undesired phrase from the rest?
Also is there a way for it to ignore empty cells?
Oct 30 2022 08:34 AM
Solution@Asparagus To answer both your questions:
=FILTER( D2:D9, (D2:D9<>"host") * (D2:D9<>"Refer to Blocking") * (D2:D9<>"") )
The multiplication is effectively the condition AND.
Oct 30 2022 08:38 AM
=FILTER(D2:D13,((LEN(D2:D13)<>4)+(D2:D13<>"host"))*(D2:D13<>"")))
You are welcome. You can try this formula to return all cells that don't have a length of 4 digits or don't contain "host" and ignore blanks.
=FILTER(D2:D13,(LEN(TRIM(D2:D13))-LEN(SUBSTITUTE(D2:D13," ",""))+1=3)*(D2:D13<>"Refer to Blocking"))
You can try this formula to return all cells that have 3 words besides "Refer to Blocking". Blanks are ignored because the formula looks for cells with 3 words.
Oct 30 2022 08:58 AM
Oct 30 2022 09:05 AM