Expand an extra condition in formula

P

Paula

Hi

In a previous posting I was advised on the below formula, however I need to
expand it further to ask for the following conditions

If the length is 11 characters and the left 3 characters and right 3
charaters are the same say yes
If the length is 7 characters say yes.

I'm stuck on how to do this, can you help me adapt the below formula or
advise of what I could use?

Kind regards

Paula


=IF(AND(LEFT(F2,3)=RIGHT(F2,3),LEN(F2)=11),"yes","no")
 
B

Bob Phillips

Try

=IF(OR(AND(LEFT(F2,3)=RIGHT(F2,3),LEN(F2)=11),LEN(F2)=7),"yes","no")

HTH

Bob
 
M

Mike H

Paula,

Try this

=IF(OR(LEN(A1)=7,AND(LEN(A1)=11,LEFT(A1,3)=RIGHT(A1,3))),"Yes","")

Mike
 
M

Mike H

You never mentioned NO in your text but I see it in your first formula, Try
this instead

=IF(OR(LEN(F2)=7,AND(LEN(F2)=11,LEFT(F2,3)=RIGHT(F2,3))),"Yes","No")

Mike
 
P

Paula

Hi Mike,

Fantastic!! It works perfecrtly. Thanks again for your help, you have helped
me before.. I'll mark the post as helpful..

Bye and have a great day.

Paula
 
M

Mike H

Your welcome, glad i could help

Paula said:
Hi Mike,

Fantastic!! It works perfecrtly. Thanks again for your help, you have helped
me before.. I'll mark the post as helpful..

Bye and have a great day.

Paula
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top