in B9 I have text (could be whatever length)
in S9 I need to return all or part of B9 depending on character or word count of B9
condition 1 - If B9 word count < 55 and character count < 140 the return all of B9
condition 2 - If B9 word count < 55 but character count > 140 then return the first 140 characters that are full words
condition 3 - If B9 word count > 55 but character count < 140 then return the first full 55 words.
condition 4 - If B9 word count > 55 and character count > 140 the return the first 140 characters that
are full words
I get the concept of the formula needed....trying to figure out how to return back "full" words in condition 2,3,4
Here is what I have so far in S9...
=IF(AND(LEN(B9)<140,LEN(TRIM(B9))-LEN(SUBSTITUTE(B9," ",""))+1<55),B9,IF(AND(LEN(B9)>140,LEN(TRIM(B9))-LEN(SUBSTITUTE(B9," ",""))+1<55),LEFT(B9,140),""))
Your thoughts would be greatly appreciated.
stapuff
in S9 I need to return all or part of B9 depending on character or word count of B9
condition 1 - If B9 word count < 55 and character count < 140 the return all of B9
condition 2 - If B9 word count < 55 but character count > 140 then return the first 140 characters that are full words
condition 3 - If B9 word count > 55 but character count < 140 then return the first full 55 words.
condition 4 - If B9 word count > 55 and character count > 140 the return the first 140 characters that
are full words
I get the concept of the formula needed....trying to figure out how to return back "full" words in condition 2,3,4
Here is what I have so far in S9...
=IF(AND(LEN(B9)<140,LEN(TRIM(B9))-LEN(SUBSTITUTE(B9," ",""))+1<55),B9,IF(AND(LEN(B9)>140,LEN(TRIM(B9))-LEN(SUBSTITUTE(B9," ",""))+1<55),LEFT(B9,140),""))
Your thoughts would be greatly appreciated.
stapuff