Extract information based on left 2 characters

Posted on 2011-10-12
Last Modified: 2012-05-12
Hello Experts!

Have a worksheet that has a field called "route ID"  this is made up of 2 alpha characters and 4 numeric characters or it could be 5 numeric with the left 2 being the identifier.  It is always the left 2 characters.  What I am hoping to do is to have a msgbox ask which departure we require and from that extract information in column a to d on a new worksheet based on the answer from the msgbox AND only those that match the left two characters of those ID's that match those in a table.  I've attached the simple spreadsheet and some additional information to help clarify what I need.  

Thanks in advance.

spudmcc (Andy) Book12.xlsx
Question by:spudmcc
    LVL 85

    Accepted Solution

    How's this? Change the value in the list in B1 and it will create a new sheet and output to it.

    Author Closing Comment

    Thanks so much!  I appreciate your speed in providing a solution.  It works great!


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
    Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now