One of the most tedious tasks you can be faced with in Excel is having to change the format of imported data to match the rest of the workbook.
Let's say there are hundreds of names in the format "Gates, Bill" and "Minogue, Kylie" and you'd like them to read "Bill Gates" and "Kylie Minogue". This can be done by using Excel's string functions to extract the SWllames and forenames into temporary columns, recombining them with spaces between the names and then pasting them over the original data, but this takes a lot of setting up and it's easy to make mistakes. A much better option is using a Visual Basic macro that goes through the names and con'ects them without affecting any other parts of the worksheet.
If you've had any experience in programming you'll recognise this as a ForlNext loop that goes through each selected cell and examines its contents looking for a comma. If it finds one, it takes the name following the comma, adds a space, and then appends the remainder of the name.
Fortunately, you don't need to know how it works in order to use it. Just set yourself up with an Excel spreadsheet and type in a few names using the pattern surname, first name. Use Tools, Macro, Macros to summon the Macros dialogue box. Type Switch as the name of the macro and click Create. The Visual Basic Editor opens with Sub and End Sub lines for the Switch macro already in place. Type the code listed above between these two lines, pressing Enter after each line. Press Alt and Q to retum to the worksheet, then save it as Names.xls with its macro in place.