• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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