Kristina Ricks ISYS 520 VBA Project Write-up Around the World

Similar documents
FareStar Ticket Window Product Functionality Guide

Travel Agent - User Guide

USER GUIDE Cruises Section

CruisePay Enhancements for 2005 Training Guide Version 1.0

PASSUR Aerospace. Departure Metering Program at Toronto Pearson International Airport. Training Manual

Product information & MORE. Product Solutions

Copyright Thomson Financial Limited 2002

Concur Travel User Guide

Your guide to making a booking

Copyright Thomson Financial Limited 2006

Additional Boarding Setup and Daily Operations Guide

ultimate traffic Live User Guide

myidtravel Functional Description

Q. Can I book personal travel on the site? - The Concur site is to be used exclusively for business related travel.

Online Guest Accommodation Booking System

WHAT S NEW in 7.9 RELEASE NOTES

myldtravel USER GUIDE

A New Way to Work in the ERCOT Market

VARIBLE COMMISSIONS OVERVIEW

SENIOR CERTIFICATE EXAMINATIONS

Online flight bookings

FSXmap.com. Interactive Airport and Runway map for Flight Simulator X

USER GUIDE DOCUMENT VIETJET AIR FLIGHTVIEW

NAIPS Internet Service Authorised NOTAM Originator User Guide Version 3.0. (To be read in addition to NIS User Guide 3.0)

S-Series Hotel App User Guide

E: W: avinet.com.au. Air Maestro Training Guide Flight Records Module Page 1

FLICA Training! Horizon Air Flight Attendants!

Specialty Cruises. 100% Tally and Strip Cruises

TIMS & PowerSchool 2/3/2016. TIMS and PowerSchool. Session Overview

CASS & Airline User Manual

What if I just want to obtain flight schedules without making a reservation?

e-crew Horizon Air Pilot Trip Trades Phase I Notes for the Crewmembers

e-crew Horizon Air Trip Trades Notes for the Flight Attendants

FAASafety.gov Help Manual for WINGS - Pilot Proficiency Program Federal Aviation Administration May 1, 2007

Supports full integration with Apollo, Galileo and Worldspan GDS.

INTERNATIONAL CIVIL AVIATION ORGANIZATION AFI REGION AIM IMPLEMENTATION TASK FORCE. (Dakar, Senegal, 20 22nd July 2011)

PublicVue TM Flight Tracking System. Quick-Start Guide

CruiseBuilder 2.0 Tutorial. How to Set Up CruiseBuilder 2.0 How to Use CruiseBuilder 2.0 Booking Engine

Physical Security Fleets Analyzer Saved Searches... 62

Concur Travel: View More Air Fares

ELOQUA INTEGRATION GUIDE

Be fast with fares. Be first with customers

Preliminary Staff User s Manual. CASSi The Computerized Aircraft Scheduling System Rev. 1.28a. February 10, 2001

How to Program the PMDG 737 NGX FMC

Unit Activity Answer Sheet

Booking flights At the restaurant Wiki. Triggers. February 24, Grégoire Détrez Tutorial 4

What s New in VAX VacationAccess? VAX VacationAccess December 8, 2011 Enhancements Reference Guide

TIMS to PowerSchool Transportation Data Import

Currently used for: Reservation Calendars

Homeport 2.0 User Guide for Public Users

Official Journal of the European Union L 186/27

Configuring a Secure Access etrust SiteMinder Server Instance (NSM Procedure)

SmartFares User Guide

Welcome to Air Tickets

myldtravel USER GUIDE

Robert H. Lane, MBA, Ph.D. Lane Services, LLC Richard Gaines, PMP Salesian Missions

Eurowings Aviation & Consulting Ltd.

General Information on 24-Month OPT Extension Based on Degree in Science, Technology, Engineering, or Math (STEM)

Introduction of FAR 117 and Q Software Enhancements

[Docket No. FAA ; Directorate Identifier 2006-NM-204-AD; Amendment ; AD ]

Virgin Atlantic Airways Limited Global BSP Agency Debit Memo Policy

SOMMAIRE WORK IN SAS MODE BORDEAUX OR ST NAZAIRE CAN TAKE 3 TABLES OF 4 AGENTS ONE LEADER PER TABLE 10. BOOK A CAR 1.

Conceptual Design of a National Database of Air Passenger Survey Data

2019 Vacation Bidding

PALANGA AIRPORT INCENTIVE SCHEME

2016 Travel Tips for Nantucket Residents

CMC Member Guide to the CMC Website

Phytclean Guide: How to apply for phytosanitary (special) markets

Concur Travel: VIA Rail Direct Connect

INTERNATIONAL FIRE TRAINING CENTRE

Concur Travel: User Supplied Hotels

Don t Miss Your Flight!

PHY 133 Lab 6 - Conservation of Momentum

Air Carrier E-surance (ACE) Design of Insurance for Airline EC-261 Claims

Each room will automatically be selected with the same room type (standard, junior suite, ocean view, etc.).

ANA Domestic Flight Online Business Travel Arrangement System. October 2017 All Nippon Airways Co., Ltd.

2016 Travel Tips for Nantucket Residents

GDS Connect for Travel Professionals. Ground Transportation Reservation Script Training

RV10 Weight and Balance

Lesson: Total Time: Content: Question/answer:

Solutions. Author, Department Place, Date

Specialty Cruises. A. 100% Tally and Strip Cruises

EVERYTHING YOU NEED TO KNOW ABOUT BOOKING WITH A2BTRANSFERS.COM

To view a video tutorial, click here:

Measuring Productivity for Car Booking Solutions

Clue Card Direct Shopping Direct Shopping is accessed through the SmartFares home page.

The Mass HIway Connection Requirement: Year 1 & Year 2

Sabre: Refund and Exchange Customer Questions

InHotel. Installation Guide Release version 1.5.0

PetExec Boarding Add-Ons

Virgin Australia s Corporate Booking Portal User Guide

FREQUENTLY ASKED QUESTION November 2014

Table of Contents. Part I Introduction 3 Part II Installation 3. Part III How to Distribute It 3 Part IV Office 2007 &

Consideration of application for the introduction of Bus Éireann's Leap card fares in Cork city

MyTravel CAMP IPPS 2016

AirFrance KLM - AirShopping

OVERSEAS TERRITORIES AVIATION REQUIREMENTS (OTARs)

Mobile FliteDeck VFR Version Release Notes

The NAT OPS Bulletin Checklist, available at (Documents, NAT Docs), contains an up to date list of all current NAT Ops Bulletins.

Module Objectives. Creating a Manual Fare Build

Transcription:

VBA Project Write-up Around the World Initial Problem Online resources are very valuable when searching for the cheapest flights to any particular location. Sites such as Travelocity.com, Expedia.com, and Kayak.com each search through numerous carriers to provide the user with the most suitable flights that meet the users criteria, while also finding the cheapest price. Overall, these sites are incredibly useful. However, they fail to take into account extremely flexible travel dates. While some websites allow users to select flexible dates such as plus or minus 10 days from a given departure date, they are still useless when the date range is much larger. My goal was to find a way to overcome this problem. I wanted a tool where I could put in a date range as vast as January to August and I would get out the cheapest time to fly. Executive Summary Around the World is a personal project developed to help me find the cheapest flights to any major airport around the world. To do this requires several user inputs which are entered into the Entry Form sheet in excel: Flight Specifications 1. Departing From Airport code of where the person is planning to depart from 2. Going To Airport code of the location where the person wants to travel to 3. Departing Between This requires two dates: o Earliest date the person is willing to depart on o Latest date the person is willing to depart on 4. Duration How many nights the person wants to stay Personal 1. Number of Adults 2. Number of Children a. Age of each child 3. Number of Seniors Two Options Earliest Possible Departure Date: Given this information, my program begins on the latest departure dates and works backward using increments (given by the duration input) to find the lowest cost flight. If two flights are equal in cost, my program assumes that the individual wants to leave as early as possible within their given time frame.

Latest Possible Departure Date: Using the same method as described in the Earliest Possible Departure Date section, this sub procedure assumes that the person wants to find the latest possible departure date that has the cheapest flight. This means that if multiple dates have an equally low cost, then the latest possible departure date is returned. Open and Book in Expedia.com Finally, once the cheapest flight data is returned, if the user is satisfied with the date and cheapest price of the flight they have the option to click on the Open and Book in Epedia.com button. This immediately opens the specified cheapest flight according to the cheapest flight criteria as listed on the Entry Form sheet. The user simply has to click on the flight and book it. Implementation Documentation Step 1 Finding the right website With all of the various websites that are made for users to find cheap flight information, it was crucial to find a site with the cheapest flights and that was the most user friendly. Travelocity.com allows for flexible travel dates, however, once the cheapest flight is clicked it returns an invalid flight and ends up taking excess time trying to figure out if the flight is actually available or not. Kayak.com provides a calendar with prices for specific dates, however, these prices do not include taxes or fees. Once they are actually selected end up being much more expensive than initially stated. Expedia.com user friendly and includes taxes and fees in the prices listed initially. I chose this website because it proved to have even cheaper prices than what were listed on kayak.com or on Travelocity.com. It proved to return consistently cheap results and returned information in the same format for most user specified criteria. Step 2 Initial Setup Using the criteria from Expedia.com, I made an entry sheet in excel where the user must populate their data in order to be able to find the cheapest flight. This entry sheet must include to and from airport codes, preferred departure date range, number of adults, seniors, and children with their ages. On the Dates sheet the dates to loop through the data were included. The initial date range was listed populated into cells B1 and C1 and then the number of days between the beginning and end of the date range was calculated in cell B2. This number provided the number of times that the program needed to loop in order to find the prices for the flights for all departure dates within that range. As the sub procedure is actually running cells B5 and B6 show which date the loop is currently running prices for.

A FinalData sheet was entered to show the raw information for the flight prices. Initially cell B1 is set equal to $50,000. This means that as any new flight criteria is entered, all flights are going to be cheaper than this amount and the information for the specified flight will be entered in cells A1 through D4 on this sheet. A further explanation of this is included below. Step 3 Expedia Sub Procedure Using Internet Explorer all data the user entered into the Entry Form sheet was entered into Expedia.com interface and the search for flights was initiated. Once the page had loaded the information was downloaded to a new sheet where a search looked for the term round trip in order to find the first (cheapest) result found on the page. The information around that statement was then copied and pasted into cells A6 through D9 of an existing sheet FinalData and the previous mentioned new sheet was deleted. Because the content of the returned results changed with differing search criteria, IF THEN statements were used to assert the format of cells A6 to then extract the price data from that cell and copy it into cell B6. This was done using three different functions based on the format of the cells: whether they contained per person, =, or did not contain either of those. Mid, Left, and Instring functions were then use to extract the relevant price data from the cell. The value found by using these functions (price of the flight) is then compared to the flight price listed in cell B1. If the flight is <= the current price listed in cell B1 then the new information for the flight is then cut and copied into cells A1 through D4, thus replacing the old information. If however, the price is > the currently listed price the flight information for the new flight is then deleted. This sub procedure continues to loop through this process until it has looped the number of times to find all possible departure dates (as found in the Dates sheet described previously). Once the loop is finished, the final cheapest flight information is then populated into column G of the Entry Form sheet. Step 4 Created another option for finding the latest departure date Instead of using the <= function as described three paragraphs above, I created a separate sub procedure that assumes the user wants to find the latest possible departure date within the range given. This is done by simply using a < function. Because the loop starts from the latest departure date, only the latest possible cheapest departure date will be returned. Consider the following example for the Earliest Possible Departure Date. Inputs: Departing From: SLC Going To: LAX

Departing Between: 01/15/2011 and 01/20/2011 Duration: 2 nights Adults: 1 Children: 0 Seniors: 0 Starting with the latest departure dates, my program would enter the information from the Entry Form on the Excel file directly to Expedia. The first date range entered would be the latest possible date range 01/20/2011 to 01/22/2011. This takes into account the latest departure date and a two day stay. Once the results for this flight have loaded in Expedia, they are downloaded to a new sheet in excel. Using the find capability the program then copies the flight information and cost for the cheapest flight for that date range. Excel would then return the cheapest cost of this flight date range into the FinalData Sheet in Excel. Next, my program loops and repeats the process for the next possible latest date range which in this case is 01/19/2011 to 01/21/2011. However there is a slight variation if the cost of this date range is less than or equal to the cost of the previously found date range, the previous flight information is cleared and the new flight information takes its place. If the new flight is more expensive, then its information is cleared out and the old flight remains on the FinalData worksheet. This works because of an IF THEN statement in VBA which essentially states that if the new data is <= to the old data, then the new data replaces the old data, Else, the new data is deleted. In the Latest Possible Departure Date sub procedure this IF THEN statement is changed to say that if the new data is < the old data, then the new data replaces the old data etc. Consequently, this ends up finding the latest possible date of departure with the cheapest price. In each sub procedure the programs continue to loop through this process until it they found the costs of flights for all possible date ranges that can be found with the given departure dates and duration as specified by the user. Step 4 - Open Expedia.com and Book Your Flight Finally, if the user is satisfied with the flight data returned, they have the option of booking their flight. Once the user clicks on the Open Expedia and Book Your Flight button, Expedia.com opens up and automatically searches the cheapest flight criteria found in column G of the Entry Form Sheet. All the user has to do is click on the flight and book. Learning and Conceptual Difficulties Internet Explorer Agent vs. Web Queries At first I thought that I would be able to complete this project by simply using web queries. However, after much trial and error it was determined that a much more useful way to

accomplish the task of entering in specific flight criteria online would be to use Internet Explorer rather than web queries. My first failure was forgetting to turn off protective mode in Internet Explorer, but that proved to be an easy fix and from there finding the ID of the various entry items was possible. With the help of Professor Allen I was able to learn how to more fully use the capabilities of VBA within Internet Explorer. When the form on Expedia.com webpage is pulled up it does not initially have the children s ages. If a child is listed and it does not have an age listed the sub procedure will not run. Consequently, I made it so that if a value greater than 0 was entered in for the number of children, that number would then be entered in on Expedia.com. I then learned how to execute a script to make the boxes containing the children s ages to show up. This made it so the ages of the children could then be entered. The tricky part here was that there was no button to click to make this happen, the script had to be executed instead. Formatting As mentioned previously, Expedia.com returns different types of strings of text based on different criteria. I found that if a valid flight was entered the words round trip would always be found on the returned webpage. Using this fact, I was able to create a line of code that asked if the words round trip were found on the returned page. If they weren t found, an error message would appear stating that they needed to change their flight criteria. This allowed the user to know what the problem was and where they could look to fix the problem. The key thing I learned here was how to use a reverse find function. Essentially, I learned how to determine if a word was not found on an entire sheet. Other problems with formatting included the fact that all data was not returned within the same string of text. As outlined in the second paragraph of the Expedia Sub Procedure section of this paper, it was difficult to extract the price from the various strings of text. In fixing this problem, I became familiar with mid, left, and instring functions. The real solution to my problem came with the use of an InStrRev function which starts from the right side of the string of text and works backwards to find a given character. Getting rid of dialogue boxes We had learned this in class, but I had issues with getting the dialogue boxes and Internet Explorer to automatically close. What I learned is that if the code executes all of the way through without entering break mode, then only one Internet Explorer page is opened. If it enters break mode, and then the program is rerun Internet Explorer opens up a new browser. With the other issue of closing dialogue boxes a simple Error Resume Next and Error GoTo 0 can solve this problem. Conclusion This was an extremely valuable experience and I learned a lot from actually applying what I have learned in VBA to a real-life problem.