Quantcast
Channel: Microsoft Office – The Happy Coder
Viewing all articles
Browse latest Browse all 16

Building the Impossible: The Cost Estimator

$
0
0

calculator-image-clipart-9Doing the impossible – sometimes I think that is the actual job description for consultants. I have been asked to do the impossible many times over the years, both as a consultant and as an employee. There are times when I expect the project specifications to self-destruct after I read them. This article is about one of my earlier forays into the impossible; a service contract cost estimator for an international company. I was brought in as a consultant to help re-write the proposal templates they were using and to build an application to automate their proposal generation using Microsoft Word. This was not unfamiliar territory for me because I had just spent a few years working in sales and had co-authored software designed for building proposals (see My Biggest Failure (or How I Went From Draftsman to Programmer)), the most difficult part of the job was deciphering all of the acronyms they were using. When that was done I was given another project which is the subject of this article.

The company had always provided service for their equipment and associated software free-of-charge but had decided to start charging for this service. The biggest hurdle? No one knew how much it cost and so they couldn’t determine how much to charge. The primary cost was labor which presented a big problem. You see, I was working for the International Services group so we had to cost each contract based upon local pay rates as-well-as the rates for expatriots and employees in the field. We also had to take into account the skill levels of the workers. Add this to a list of more than a half dozen types of equipment and you can see the daunting task at hand. The development tool was Excel and they wanted the ability to save the estimates to a text file so that it could be loaded at a later date and compared to actual costs. I was given the names of the experts in each product line who could help me and I got to work. The experts were located throughout the country so much of the work was done via telephone and e-mail. I was able to get everyone together in one room for the first meeting and I should have run for the hills afterward but I stuck around. There were a lot of reasons why we couldn’t build this tool – “too many variables”, “not enough data”, and “because” lead the way. I was told that it was a doomed project but I asked everyone to humor me and let me worry about how to do it, I just needed them to provide me with the data. I was lucky to have someone on the team that was well versed in probability and statistics because I had no idea how to calculate headcount. The answer was poisson and I was given a lookup table to use.

Now the fun part was set to begin. I needed to take hundreds of questions and whittle them down to something that an agent in the field would be willing to work with. This was then put into a data entry user-form in Excel with thousands of lines of VBA code backing it up. The idea was to have the main workbook that contained all of the user-forms, formulas, constants, variables and code and then a second workbook that contained the finished quote. This second workbook was also to have the ability to store all of the data in a text file that could then be loaded and analyzed. My first thought was to create a random-access file but decided to go with a separate file for each quote thereby making sharing easier.

I was able to get each product down to less than a dozen questions, in some cases only a couple, and it was time to populate the main workbook with constants, calculations and code. It didn’t take long before I had thousands of cells across multiple worksheets making it difficult to remember what I was doing where. I needed to document everything – named ranges, formulas, code, etc…. – so I wrote code. This turned out to be my very first Excel Add-in and something that I have used many times since. I could document any single aspect of the workbook – formulas, named ranges, constants, etc… – or the entire workbook. The result was a Word document, nicely formatted with a table of contents. Now if I needed to know the formula for calculating something or what the value of a particular constant was I could open the document, not search through the workbook.

Each of the experts gave me some sample estimates that they worked up so that I could test the application and, after some tweaking, I felt confident that I had delivered on my promise. As good as I felt about it I knew the “proof is in the pudding” and I needed to get it into the hands of the experts and face the music. The reaction was overwhelmingly positive and my biggest critic told me that I had truly done the impossible. There were a few things that had to be changed slightly and I re-worked the interface a bit but it was ready for its rollout the following week. This meant training users from around the world. Since it would be very expensive to send me around the world or to bring them to me, we decided to do it with conference calls and a web-based application like WebEx that allowed me to give them a live demonstration. Not bad, huh? The downside was that a 2:00 PM conference call with a group in Tokyo meant that I was on the phone at 1:00 AM!

The success of this project lead to another big project (and personal challenge) for this client, stay tuned!

If you would like to know more about this project or have one you would like to discuss, please write to me at joe@joevalencia.site90.com.


Filed under: Excel, Microsoft Office, VBA, Windows programming Tagged: cost estimation, estimator, Excel, international, labor cost, service contract

Viewing all articles
Browse latest Browse all 16

Trending Articles