• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Help with If(AND(MID( formula

IF(AND(MID(A5,4,1)="B",if(MID(A5,5="R","yes","no")))

not working but must be close?  If the 4 character in cell a5 is B and the 5 character is R, return yes, for not return no
0
RWayneH
Asked:
RWayneH
2 Solutions
 
Dan CraciunIT ConsultantCommented:
IF(AND(MID(A5,4,1)="B",MID(A5,5,1)="R"),"yes","no")
0
 
Dan CraciunIT ConsultantCommented:
Or, simpler:
IF(MID(A5, 4, 2)="BR", "yes", "no")
0
 
FlysterCommented:
Wouldn't it be easier to just use:

=IF(MID(A5,4,2)="BR","yes","no")

Flyster
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
RWayneHAuthor Commented:
Thanks for the help.
0
 
Dan CraciunIT ConsultantCommented:
You're welcome. Glad I could help!
0
 
FlysterCommented:
@ Dan:
Sorry. I forgot to refresh before posting! No points here.
0
 
MacroShadowCommented:
=IF(AND(MID(A5,4,1)="B",MID(A5,5,1)="R"),"yes","no")
0
 
Dan CraciunIT ConsultantCommented:
@Flyster: No worries, I do that all the time. You were only 98 seconds late.
MacroShadow, on the other hand... :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now