We help IT Professionals succeed at work.
Get Started

How do I identify different strings in a Range with a Case?

AFGPHXExcel asked
Last Modified: 2012-05-11
I have a range of 4 cells. Each cells can contain a particular phrase. I would like to use a case to identify if there is a string in any of the cells in the Range. Current the code can only look at one of the cells at a time. The code:

    Select Case Range("Rd_Reviewer1ReqBy_Attachment1").Value
    Case "LOJ"
    v_WksNames = Array("RequirementSummary", "Reviewer1", "LOJ")
    Call M_CreateMultiWksFile(v_WksNames)
    Case "Review File - ACO"
     v_WksNames = Array("Reviewer2")
    Call M_CreateMultiWksFile(v_WksNames)
    Case "Review File - Camp Mayor"
     v_WksNames = Array("Reviewer3")
    Call M_CreateMultiWksFile(v_WksNames)
    Case "Review File - Chief of Staff Approving O6"
     v_WksNames = Array("Reviewer8")
    Call M_CreateMultiWksFile(v_WksNames)
    End Select

Any help would be much appreciated.
Watch Question
Top Expert 2008
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE