Pages

Thursday 23 August 2012

Failing to plan is planning to fail....

Who hasn't had that old nugget thrown at them by a parent or teacher or any other busy body? And who hasn't inwardly (and maybe outwardly - depending on bravery levels) rolled their eyes heavenwards in exasperation? Why are we exasperated to hear that? Because we are normally hearing it too late. When to go back and re-plan and re-do and make it right would take just as long as fixing the problem would.

I am on the fence on planning, personally. I tend to go to extremes...either going with the flow and dealing with whatever comes my way, or following that other well-loved bit of advice - "hope for the best, plan for the worst", and getting myself into knots with too many plans.

However, I am fairly adamant on planning in Excel. Proper planning can make your spreadsheets, and work, so much more efficient. Also being able to see the woods for the trees, and selecting the right approach to a problem, helps immensely.

Take this example. My sister is in IT and was recently battling through a  merger of a couple of systems. She emailed me asking for some help on a VLOOKUP formula. Basically, they were running tests on various areas. Lets say that one test result would look like this:



She was getting each set of test results back and saving them as a new sheet into one summary workbook. Each sheet would have a name of Test1, Test 2 etc... She now wanted to create a summary that would look up all the results on one page. However, if she used a normal VLOOKUP, she would need to change each new column's formula to a different sheet name (Test1, Test 2 etc). Not the end of the world, but time consuming. So I suggested she use this instead:


As you can see, I have inserted an INDIRECT formula into the VLOOKUP. By doing this, when she drags the formula across the columns, the VLOOKUP will automatically pick up the new sheet name, which is also in the header row 2, saving her having to replace the sheet name for each column of results.

Side note on INDIRECT formulas - these are very handy little formulas, but pretty tricky to explain. Basically, an INDIRECT formula inserts the results of the cell that you reference in your INDIRECT formula. This is very useful if you are going to be changing things, like in the example above. So we reference the cell C2, to bring back 'Test1' into our VLOOKUP formula.

Anyway, back to the problem. Well, it was no longer a problem, it was solved. And I did exactly what she asked, I adjusted her VLOOKUP formula to change the sheet names.

However, with hindsight, a possibly better solution would have been to use a consolidation. It would have required more work at the set up, and I suspect she was beyond that stage, so I wasn't brave enough to throw the quote at her!

How I would have used a consolidation for this testing is as follows:
1) I would have created all the test sheets before hand.
2) Instead of Pass or Fail, I would assign a number to each status. So 100 for a Pass, 50 for a fail and 0 for not tested. This will make consolidating easier at a later stage.
3) I would then have created my consolidation summary sheet, using the Excel consolidation tool.

How?
Here goes...
1) Go to a blank sheet.
2) Go to Data - Data Tools - Consolidate
3) A pop up box will appear. I have already filled this one in, and will talk you through it below:

 


Function: - You can choose a function like Sum, Count etc. I have chosen Average for this example...you'll see why later.

Reference: - Click into this box and then go the sheet you want to include in your consolidation. It is better to include the entire column or row if you are going to be adding in more data.

Click Add and it it will add the referenced cells into the box below, which contains all the references you want consolidated.

Use labels in - I have ticked the Left Column, as this is what Excel will use to consolidate the data. This is very handy because you don't have to have all your sheets identically laid out, and you don't need to have an identical list of items. Excel just matches what it can.
It works the same for labels in the top row.

Create links to source data - this is very important as it brings back an actual formula showing all the sheets linked. It also ensures your data will be updated when the source sheets are changed.

Click OK, your pc will whirr for a second, and then hey presto, you get this:

 
These are the results of four different test sheets, averaged out. To see the full detail, click on the little 2 on the top left hand corner, and you get the works:


Now, if you did all this before you started testing, you could send out the links to the individual sheets to each tester. As they completed their own tests, you would get a running update on how your tests are looking. And you can keep on kicking butt until the averages are all 100!

So that is a quick overview on the consolidation tool. Some notes:

1) If your worksheets are all laid out identically, you don't need to use labels in the consolidation.
2) Try to get your consolidation perfect the first time. Making adjustments afterwards will probably require you to restart your consolidation.
3) Plan, plan, plan.

Don't want to miss out on the weekly tips? Why not sign up here? We'll remind you...in the nicest possible way!

Happy spreadsheeting!

No comments:

Post a Comment

Like this? Or not? Would you like a specific topic covered? Leave a comment and let me know.....