Solved

Help with If(AND(MID( formula

Posted on 2014-04-28
8
157 Views
Last Modified: 2014-04-28
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
Comment
Question by:RWayneH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 35

Assisted Solution

by:Dan Craciun
Dan Craciun earned 500 total points
ID: 40028159
IF(AND(MID(A5,4,1)="B",MID(A5,5,1)="R"),"yes","no")
0
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 40028169
Or, simpler:
IF(MID(A5, 4, 2)="BR", "yes", "no")
0
 
LVL 22

Expert Comment

by:Flyster
ID: 40028180
Wouldn't it be easier to just use:

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

Flyster
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Closing Comment

by:RWayneH
ID: 40028182
Thanks for the help.
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 40028188
You're welcome. Glad I could help!
0
 
LVL 22

Expert Comment

by:Flyster
ID: 40028189
@ Dan:
Sorry. I forgot to refresh before posting! No points here.
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 40028198
=IF(AND(MID(A5,4,1)="B",MID(A5,5,1)="R"),"yes","no")
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 40028207
@Flyster: No worries, I do that all the time. You were only 98 seconds late.
MacroShadow, on the other hand... :)
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question