Monday 13 May 2013

Alfie Boe and Les Miserables

I was in big trouble with The Boss over my ignorance of the phenomenon known as Alfie Boe and as for not being a Les Mis fan, it was the seventh circle under the pit for me. I knew that some serious crawling was needed. No problem, I've been crawling all my life.

Les Miserables
How's about this for the Les Mis fan? The Les Misérables book! From Stage to Screen is packed with interviews and photographs of the cast and crew of the film, set designs and photographs, memorabilia posters, pictures of the original stage and costume designs and loads of other fascinating trivia. A chocolate box of fun for the serious Les Mis fan.

And all available for a knock-down price at CostCo. I carefully peeled off the price sticker (the old trick) and pressed it into his hot little hands. Job done, all was well with the world.
Les Miserables
But my troubles were not yet over. I had been welcomed to the Boe fold but gently chided by some of our correspondents. Fancy not knowing about Alfie Boe and Les Mis, the poor boy needs to be enlightened.

One of them had very kindly suggested that a suitable course of treatment would be for me to get a copy of the DVD of the 25th Anniversary Concert of Les Miserables performed at the O2 Arena, purchase a nice bottle of wine, invite some friends over, crank up the volume and discover what I've been missing out on.

Now, I know that it was meant kindly but where I come from we call this being "stitched-up". Stitched-up like a kipper. Thanks.

Les Miserables, the treatment 

It must be done, there's no getting away from it. I was ready to be treated, processed and re-educated and here's all the good news; Les Mis on the disk and for drinks we are having a recent discovery of mine, Aperol Spritz.

Les Miserables DVD
This is an irresistible mixture of Aperol aperitivo, Prosecco and soda. Such a wonderful colour. The concoction is completed with ice and a slice of orange.

As an incentive to my finishing the treatment I was threatened with something far, far more dreadful than a few hours of Les Mis. Should I fail to pay attention or display insufficient enthusiasm then there was a very special treat in store for me. Yes, an evening with Michael Ball's Christmas songs instead.

By now you may well be thinking, "what's the matter with that?" Michael Ball is an most agreeable troubadour and is much admired. All I can say is Les Mis is utterly fantastic; the very, very best ever and I thoroughly enjoyed every wonderful minute of it. How long to I have to gush for until you put that Michael Ball CD away and stop threatening me with it? I've nothing against Michael Ball as such, after all he's married to Cathy McGowan of Ready Steady Go! fame. It's just that I don't like Christmas songs out of season.

Michael Ball CD
Seriously though, I did enjoy the show, the Matt Lucas performance of Thénardier was particularly good. I'd like to thank you all for bringing a little bit of pleasure to my miserable existence.

But there is a bit of an issue that we need some advice on. As you know, there is an appearance by the "Valjean Quartet" at the end; Alfie Boe, Colm Wilkinson, John Owen-Jones and Simon Bowman. We were wondering how the hard core Alfie fans rated him alongside the other tenors.

In our opinion, Simon Bowman got the thumbs down. Not that he was bad but that the others were so good. Alfie, we thought, was very good but his delivery is so powerful that it could be overwhelming. He is a bit over the top. The Boss rates the mellow tones of Colm Wilkinson and, as it well known that Welshmen are the best singers in the world, my vote went for John Owen-Jones. My family are Welsh but, as it is well known that Welshmen are very fair-minded, I can assure you that this has not influenced my judgement.

Alfie Boe on TV
Anyway, I can now present the case for the defence and offer some pretty solid documentary evidence that I am watching and thoroughly enjoying "Les Misérables". Just in case you can't tell who's who, Alfie is the good looking guy on the telly and I'm the lazy slob with his feet up wearing the Wabis.

To finish, here's an incredibly dull Les Mis story. Some years ago I used to work in Manette Street, which is just up the road from the Palace Theatre in London's West End.

Occasionally, I liked to go for a quiet lunchtime drink at the downstairs bar in the theatre as all the local pubs were packed out with noisy students from Central St Martin's. One day I was chatting with the barman and he said that they'd be closed next week for redecoration as there was a new musical opening. "Oh, what is it?" says I. "Some French thing about Victor Hugo" says he. We both shook our heads and agreed, "Can't see that running for very long...."

Wednesday 8 May 2013

Excel Calculations without Formulas

If you use Excel on a regular basis then you probably know all about formulas and functions but it's too easy to get into a mental rut and neglect some of Excel's simpler operations. Here's a typical example, my worksheet contains the Sales Forecast figures for the next few months and I've just been told that I now have to increase all the figures by 4%. 

Excel Paste Special Operations

So what do you do? Copy and Paste all the numbers to another worksheet, write a formula to multiply everything by 1.04 then Copy and Paste Special as Values to fix the numbers and finally, copy all the new numbers back to the original worksheet. Well, you could but....

Paste Special Operations

Instead of removing the numbers to another worksheet and doing formulas you can manipulate the cell values in place. Type the multiplier value of 1.04 into an empty cell (any cell will do) and then copy it. Now that you have your value on the Clipboard you can apply it to the numbers.

Excel Paste Special Operations

Select your numbers and then choose Paste Special and in the Operation section click the Multiply option button. Click the OK button and all your numbers are uplifted by 4%. You don't need the 1.04 multiplier in the cell any more and you can delete it whenever convenient.

Halving numbers, doubling numbers, converting negatives to positives (multiply by minus 1), adding one set of numbers to another or subtracting. These tasks can all be effected without writing a single formula. The Paste Special command is usually available in the right-click shortcut menu or the Edit menu or the Paste control on the Home tab for newer Excel versions.

Finding the Numbers in a worksheet

When you have numbers in a worksheet that you need to select and you don't want to have to do the selection yourself try using Go To Special.

Excel Go To Special
For example, in the previous example I wanted to select the numbers on a worksheet so that I could multiply them. I did not want to select the cells containing formulas, just the cells with normal numbers or, in Excel speak, the numeric constants.

Choose Go To Special and then click the controls to specify what class of worksheet data you want to have selected. In this case, the Constants option button and the Numbers check box. Click the OK button and Excel selects those values wherever they are on the active worksheet.

Should you select a range before choosing Go To Special then the cell selection is confined to the currently selected range.

So, where is Go To Special? It depends on the version of Excel that you are using, if you have the older versions with the drop down menus then you should choose Edit, GoTo and then click the Special command button. In newer Excel versions with the ribbon, go to the Find & Select control on the extreme right hand side of the Home tab, click the control and it's in the drop down menu. 

Related Posts

Excel-Calculating age from date of birth
Excel-Sorting by last name
Excel-Switching columns to rows
Excel-AutoSum Revisited

Training Courses

If you've still got that "I just don't know what I'm doing" feeling then you might like to arrange an Excel training course for yourself or with some of your colleagues. It's really easy to book one of our courses and they're great value for money. See our website for full details.

Excel Sorting by Last Name

Excel Sort by Last Name
You have a list of names in your Excel spreadsheet with both the first and the last names in the same cell and you want to sort your list alphabetically by the last name. Not too much to ask, is it?

The bad news is Excel sorts on the entire entry in the cell reading from the left hand side and you can not specify any particular element of your text to provide the sort order. That's what you want but you just can't have it. Sorry.

The only way to do this is to isolate the last names into a separate column and then base your sort on that column and not on the existing names. Make sure that the sorting column is right next to one of the existing columns in your worksheet so that Excel captures it as part of your list. You can always hide your sorting column. 

There are several methods of isolating the last names. In this article we shall be discussing Flash Fill, Text to Columns, Find and Replace and Formulas. To make your life easy, try to make your text as regular as possible as most of these processes are about finding a space in the middle of a bit of text. Any double-barrelled names like Ann Marie, Jean Paul or Wynn Jones will be much easier to process if you substitute the space with a dash; Ann-Marie, Jean-Paul or Wynn-Jones.

Using Flash Fill

What could be easier, type in a few suggestions (I did Doe and Doetta) and then shoot over to the Data tab and click the Flash Fill control. To be fussy, I could say that I really wanted to have Wynn-Jones instead of Wynn so I should have included one as an example but it's only for sorting so I'm happy.

Excel Flash Fill
What's your problem? You're looking at your Data tab and you don't have a Flash Fill control? That's because it's new with Excel 2013.

That's the problem with this method; you need the software. You either have to buy a new copy of Excel or check out the rental version on Office 365.

Excel Flash FillFlash Fill is far and away the best method for this exercise and I would throughly recommend it as the program is so good at picking out patterns from your examples. The only drawback is that you would have to repeat the exercise whenever you added new names to the list. It's worth buying a new copy of Excel just for Flash Fill.

Using Text to Columns

Text to Columns is where you can use the space between the first and last names as a "delimiter" and have Excel generate two columns of data; one with the first names and the other with the last names. You delete the first names column and keep the last names as your sort column. There will be issues with titles, middle names and initials etc.

Excel Text to Columns
Start by inserting a few blank columns into your worksheet and then copy and paste your names column so that you have two sets of names. Click the column letter at the top of the copied column and look for the Text to Columns command, it's either on the Data tab or on the Data menu if you have an older version of Excel.

Excel Text to Columns

This is Step 1 of the Text to Columns Wizard and here you just need to specify that you are processing Delimited data and then click the Next button to move on to Step 2.

Excel Text to Columns

Step 2 is where you specify the Delimiter; clear the Tab check box and click the check box for Space then examine the Data preview. As you can see, it's not perfect as every space character has been used as a separator but it has done the bulk of the work so click the Finish button.

Excel Text to Columns

Here's the resulting text, it's been chopped-up (or parsed) into separate fragments based on wherever a space character was found in the original text. There's still a bit of work to do as you need to delete the unwanted columns. It's always a good idea to insert a few extra blank columns into your worksheet before using Text to Columns as this will avoid your accidentally over-writing any existing data. 

Using Find and Replace

Again, this is all about using the spaces as separators and employs two passes of Find and Replace in combination with wildcards. This is definitely one for all the Find and Replace fans, I am constantly amazed at how creative and ingenious some people can be with Find and Replace.

Excel Search and Replace Wildcards

Click the column letter at the top of one of your columns where you have the names and then replace every space with an arbitrary character, in this case an @ sign. You can use any character you like, just make sure that it's a character that would not be found in any of the names. Type a space into the Find what box and an @ sign into the Replace with box then click Replace All. Now all the names look something like this: Bill@Bloggs, John@Smith etc.

Excel Search and Replace Wildcards


The next job is to strip out all the text up and including the last @ sign by replacing it with nothing which will then leave the last text element which is, of course, the last name. Type the following expression into the Find what box, ?*@ and leave the Replace with box empty. Click the Replace All button and you are left with the last names.

The wildcard characters used here are the question mark, ? which means "Find any type of character" and the asterisk,* which means "Find everything". Therefore ?*@ means "Find everything leading up to and including the last @ sign".

Using Formulas

And then there are the Excel fans who would not dream of using Find and Replace because, for them, everything is done with formulas and functions for they can not be parted from their commas and brackets. The formula solution uses Text functions and is quite complex but it is constructed in stages; use the FIND or SEARCH function to read the text from the left hand side to find the position of the first space character. Then use the RIGHT function to extract the text after the space.

Excel FIND function
This is the first step, locating the first space in the first cell:

=FIND(" ",B2)

This formula gives the result of 5, the first space is located at character index 5, after the first four characters, "John". The FIND function is case-sensitive which does not matter if you are finding a space but it could be an issue for some other characters, in which case you should use the SEARCH function which is not case-sensitive.

The next job is to extract the text from the right hand side up to, but not including, the space character which has now been located. Of course, the names are of varying length so you need to calculate how many characters in from the right hand side for which you need the LEN function. So the LEN of the cell minus the FIND value gives the number of characters required.

Excel RIGHT and LEN functions
Here's the finished formula:

=RIGHT(B2,LEN(B2)-FIND(" ",B2))

Be careful with the commas and the brackets if you are hand typing or click the Insert Function (fx) button and let Excel do them for you.


Excel extracting data using Text functions
The final job is to copy the formula down the column and extract all the last names.

You can leave the formulas in the cells as it will not affect the sorting and it will make any additional records much easier to process as you can just copy the existing formulas.

A final thought, why didn't we have two columns in the first place? 



Related Posts

Excel-Calculating age from date of birth
Excel-Calculations without formulas
Excel-Switching columns to rows
Excel-AutoSum Revisited

Training Courses

If you've still got that "I just don't know what I'm doing" feeling then you might like to arrange an Excel training course for yourself or with some of your colleagues. It's really easy to book one of our courses and they're great value for money. See our website for full details.

Tuesday 7 May 2013

Switching Excel Columns to Rows

Of course, if you want to impress, you should really call this "Transposition". Excel data can be rearranged from columns to rows or vice versa. And you can transpose as many rows or columns as you like all in one go. All you need to decide is whether you want to do the rearrangement just once or whether the transposed data needs to update to reflect any changes made to the original.

Excel Transposition
Static transposition, where the data is rearranged just once is really easy to do. However, dynamic transposition, where you have two sets of Excel data; one arranged in columns and the other in rows, is much more difficult and involves your entering an array formula.

Static Transposition

If you know how to Copy and Paste then you'll find this one a breeze, the copy bit is as normal but there is a variation to the paste bit. Select the original range of cells and Copy them. Then click a blank cell that is away from the original range and Transpose; there is no need to select the entire range for the transposition, a single cell is all you need.

Excel Transposition
Finding the Transpose command depends on which version of Excel you are using. If you have a modern version of Excel with the fancy ribbons then you should be able to find Transpose in the Paste control on the Home tab or in the shortcut menu when you right-click.

Should you have one of the good old fashioned versions with the drop-down menus then look for Paste Special which is found in the Edit menu, failing that right-click after you have done your Copy and you may very well find Paste Special in the shortcut menu.
Excel Transposition
When the Paste Special dialog appears you need to find the Transpose check box, give it a click and then click the OK button. Sounds easy doesn't it? But I often find myself staring at the screen muttering "now, where's that Transpose thingy..." Because it's right down the bottom, where it always has been.

Dynamic Transposition

In the previous example we transposed our data and ended up with two independent ranges of cells, one of which you would probably want to delete. However, you might want to keep both ranges and have the transposed data change when changes were made to the original. This where you need to have a formula. The most painful method would be to go through each cell, enter an equals sign and click the corresponding cell in the original range. Very tedious indeed.

A much better method would be to create an array formula using the TRANSPOSE function. Array formulas are not easy to enter and most sensible people run screaming from the room at the mere mention of them. So don't get annoyed if this formula takes a few goes to get right. Like most Excel formulas you have to persevere and suffer for a bit until you feel confident.

Excel Array formulasArray formulas are entered into ranges of cells in one go, not entered into single cells and then copied which is what we are used to. You select the range, enter the text of the formula and finally, press CTRL+SHIFT+ENTER on your keyboard to enter your formula into the selected range.

The first job is to count the number of rows and columns in the range that you wish to transpose and then select a range of empty cells whose dimensions correspond to the inverse of the original range. For example, I want to transpose the range D4:G6, which is a range with 5 columns and 3 rows, so I select an range of 3 columns by 5 rows.

Excel Transposition
Now we enter the required formula which is =TRANSPOSE(D4:G6) and then holding down the CTRL and SHIFT keys, press ENTER or click the Enter box in the formula bar.

If you have a version of Excel that pops up the list of functions as you type then you can accept TRANSPOSE from the list by pressing the TAB key. Array formulas are identified in the formula bar enclosed in braces (the squiggly brackets) but you do not type in the braces when you enter the formula.

You may not change part of an array formula so if you want to delete your formula, select the entire formula first before pressing the Delete key. To edit the formula there is no need to select the whole array first but don't forget to press CTRL+SHIFT+ENTER to accept the edit.

Excel Transposition
The Excel shortcut key to select the current array is CTRL+/ (front slash) so if you have a huge transposition just click one cell and then the short cut key will select the rest of it for you.

When you are counting the number of columns or rows in a large range it is all too easy to lose count and very frustrating when you have to start over again. "One, two, three, four... " Such fun. Use the Excel functions ROWS or COLUMNS to calculate the dimensions of large ranges rather than count them. For example, the formula =ROWS(A1:D50) returns the value of 50.

Excel Transposition
Transposition formulas are not the easiest of formulas to get right but, like all formulas, once they are done they will look after themselves and update automatically.

Any changes made to the original range are immediately reflected in the transposition.





Related Posts

Excel-Calculating age from date of birth
Excel-Calculations without formulas
Excel-Sorting by last name
Excel-AutoSum Revisited

Training Courses

If you've still got that "I just don't know what I'm doing" feeling then you might like to arrange an Excel training course for yourself or with some of your colleagues. It's really easy to book one of our courses and they're great value for money. See our website for full details.