# Need help to the expert

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:48 PM GMT

## Question

QUESTION: This is my problem..I think this problem is already ask it here. Here is the question:

Create a forumla which will take column A and make sure only to include twophrases in column B and will write ERROR if there is a singleor a three or fourphrase or greater You may need to use several columns (C, D, E, F etc) to complete the task but put the final result in column B. Exampleand output

Column A Column B dogs ERROR are fluffy are fluffy but ERROR I like them a lot ERROR and I and I am going to ERROR

I think that is all about..just hoping that I can find the answer here.. I already try my very best to solve it but I don't know how to solve it.. ANSWER: please try this (you need to count number of words)

=IF(IF(LEN(A2)=0,0,LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ","")))<>2,"ERROR",A2) ---------- FOLLOW-UP ----------

QUESTION: Thanks for your reply..its almost done..aehehe...I would like to ask if where I will put the number of words..??The longestI have is 12..so where I will put that 12..??Thanks and advance..:-)

=IF(IF(LEN(A2)=0,0,LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ","")))<>2,"ERROR",A2)

In the above formula "<>2" - this is for ifcount is not equal to 2. If you would like to consider 12 as valid count then change this part as "<> 12" .

Otherwise, if you only consider count 2 is valid, then use the above formula as it is whatever the length of thecounts.

If I'm unable to explain, please send me same data with example.

Ariful