Excel data cleanup with Flash Fill

Problem

One of the participants (Mr. Amjad) in a seminar I conducted asked me this question. The scenario is common enough. But the solution is not even noticed – it is called Flash Fill. Instead, we struggle to solve it manually (and inefficiently).

There is data in one column which contains name followed by amount. We want to split the amount.

flash fill

Doing it using a formula is tricky. Because in some cases there are two spaces, in some cases there is only one space. And may be if the data is large, there could be three spaces as well.

Easy solution: Excel 2013 – Flash Fill

This is an amazing new feature. I will cover it in detail in a separate article. However, here is the way it works.

In column E, specify what you want. Just type the value. NO formula.

flash fill

Then choose Data tab – Flash Fill

flash fill

Do the same thing for the name in column F. That’s it. Excel has an amazing pattern matching engine which does the job for you.

flash fill

What if you don’t have Excel 2013? Use Word!

Then you will have to resort to complex formulas or VBA. But not really. We often get too focused on the product and forget that Office has other tools as well.

Remember. Excel is great with Numbers and Dates. But not text.

Who is the text expert? Word Logo

In fact what Excel 2013 Flash Fill does is technically called pattern matching (Regular Experssions). But Word had this feature since many years.

Let us see how to solve complex Excel data handling problems in Word.

  1. Copy the column data and paste it in Word
  2. It will be pasted as a table. But the table borders will not be visible.
  3. Click inside the pasted data, you will see the Table Tools tab
  4. Click the Layout tab and choose View Gridlines
    Now you can clearly see the tableimage
  5. We want to select only the numbers
  6. Press Ctrl H to open the Find – Replace Dialog
  7. We don’t want to replace anything so click the Find tab
  8. In the Find textbox, type this exactly as shown here [0-9]{1,}
  9. Click the More>> button and choose Use Wildcards optionimage
  10. Now try Find Next multiple times. Notice that it is selecting all the numbers one by one
  11. But we want to select all numbers. So open the Find In dropdown and choose Main Document
  12. Now all the numbers will be selected. Close the Find dialog.image
  13. Press CTRL X to cut the numbers and put them in clipboard
  14. Only the names are left in the first column.
  15. Now add a new column.
  16. Select the second column
  17. Press CTRL V to paste the numbers
  18. Now select the whole table and paste it into Excel
  19. Job done!

For the sake of completeness, the names column will have an extra space at the end. Add a new column and use the TRIM function to remove the trailing spaces if required.

Sample Word file for practice Download

How did this work?

The magic happened in that complex looking search criteria

[0-9]{1,}

Wildcard option means do not search what is typed literally. Try to interpret it.

[0-9] Means search for any number between the given range. But that would select only one digit.

{1,} Means that Word should search for one or more instances of number. That is how it selects the entire number

Want to know more?

Click in the Find textbox in Word, enable Wildcards and click the Special button.

You will see the entire syntax of what is possible. This is infinitely powerful and easy to use once you understand the concept. Try it out.

Character in Range

 

Arrange multiple pictures in PowerPoint in Picture Tools

LifeLog

Yesterday, I conducted sessions for 650+ professionals at a leading automotive manufacturing company… Very smart audience, amazing grasping power.

image

Here is one of the demos I used in the session…

Problem

I have multiple pictures. I want to put them into a SmartArt diagram quickly. But if I use Insert – SmartArt – Picture SmartArt, I have to insert each picture one by one.

That is repetitive. Repetition = Inefficiency Sad smile

Is there a faster, smarter way?

Solution

Of course there is. Here are the steps.

  1. Choose Insert – Pictures
  2. Select all pictures and add them
  3. As soon as the pictures are inserted, they are already selected.
  4. DO NOT unselect them.image
  5. Notice that pictures are of different sizes and randomly arranged.
  6. While all pictures are selected, click the Picture Tools tab
  7. Open the Picture Layout dropdown
  8. Notice that all types of Picture SmartArt appear herePowerPoint Picture Tools
  9. Choose the one you want
  10. The size of the diagram will be determined by the size of the picture selection
  11. Adjust the diagram size as neededimage
  12. Open the text editor and add titles if required
  13. That’s it!

From Boring to Exciting – Use PowerPoint SmartArt

In an  earlier post, I explained how to convert a Word document to a PowerPoint presentation in one click (ok… few clicks!). Unfortunately, the resulting presentation is guaranteed to put your audience to sleep. The presentation contains only text. And lots of bullets. Everyone in the world knows that …

PowerPoint SmartArt turns boring presentation into exciting Most presentations are boring! Still we contribute to that boredom by creating more boring presentations. If you want to succeed in your presentations, you should strive to be in the 1% image There are thousands of ways to make your presentation less sleep inducing. But one method stands out. Which is quick and easy.

SmartArt.

Convert those boring bullets into interesting and easy-to-understand diagrams.

Boredom to excitement… in few clicks

  1. Right click in your bulleted text and choose Convert to SmartArt.
  2. PowerPoint shows you 20 diagrams to choose from.
  3. Move the mouse cursor over each diagram – it is temporarily drawn … move to next till you find the most suitable diagram to explain your concept.
  4. Remember that most people don’t do this. So you are already in the 5%
  5. But you don’t want to stop there. You want to be exclusive…
  6. So have the courage of clicking on More SmartArt Graphics… (nobody has that courage… so that is your competitive advantage)
  7. Now you will have a big problem

135 diagrams to choose from!

Don’t get disheartened. In a given business context, only one or two of these diagrams are most suited. The real skill is finding the right diagram for your need. Unfortunately, there is no easy way there. You have to put effort.

Homework: Learn 135 diagrams

Spend 30 minutes of your precious life to do this:

  1. Create a new blank presentation
  2. Create a new slide (usually it will be Title and Text type of slide)
  3. Open Insert tab and choose SmartArt
  4. Look at the categories on the left. These will tell you overall categories of diagrams from a business point of view.
  5. Click on each category. Then diagrams of that category are shown.
  6. Now click on each diagram.
  7. On the right side, a bigger version of that diagram is shown. Just imbibe that visually.
  8. Look below… Microsoft has taken the trouble to explain the business context in which the diagram should be used. Read that.
  9. Move to the next diagram.

Spend image minutes of your precious life and see the difference! To stimulate your thought… here are some nice diagrams.

Risk Management

Risk Management SmartArt

Pricing is determined by demand and supply

Supply and Demand SmartArt

Input and Output

image

Colors, Styles, Animation and Effect options

Try all options on the SmartArt Tabs – Design and Formatting to know more about what you can do. Also apply some simple animation and choose Effect options to see interesting ways in which you can control the animation.

How to get full control?

SmartArt is very nice. But you have one limitation. You cannot change one item independent of others, you cannot group items and so on. Don’t worry. Use SmartArt first to create a base diagram quickly. Then click Design tab and Choose Convert to Shapes. Now it is no longer a SmartArt diagram. It becomes a simple diagram with grouped objects and shapes. Now you can ungroup it and control each shape exactly the way you want. Now you get best of both worlds. Quick diagram and full control.

Homework 2

Take any of your existing presentations. Save it as a copy. Look at existing verbose slides and see if you can improve them using appropriate usage of SmartArt

Pending issue

Creating Picture SmartArt is not easy. You insert the SmartArt first and then you have to choose one picture at a time, repeatedly. And as you know, repetition means inefficiency. In the next post we will see how to create SmartArt containing many pictures (of dissimilar sizes) in two simple steps. Another miracle coming up…

9 benefits of using Excel Tables

If I have to teach ONE thing to the world, it would be Excel Tables.

Excel tables

I recently created this video for a Microsoft Webcast.
Excel Tables were introduced in Office 2007.
This video explains the importance of using Excel Tables.

Prevent Wrong Decisions using Excel Tables

Outdated formulas in Excel are a big operational risk

Tables eliminate that risk proactively.

Additional Benefits of Excel Tables

This in itself can become a series. But here is a short description of the benefits

Auto-update of formulas and references

All dependent formulas are auto-updated across sheets. If you have a linked file, the file must be open for the auto-update to work.

Automatic formatting of tabular data

If you have manual formatting applied, the Table formatting cannot override it. To override, right click on the desired format and choose Apply and Clear Formatting option.

Automatic copying of calculated column formulas

Any formula added in new columns in the table is auto-copied across the table. The formula is copied all the way to the end of the table even if the left column has empty cells.

This saves you the trouble of using time consuming DRAG or error prone DOUBLE CLICK for copying formulas.

If you don’t like this behavior then use the SmartTag to UNDO the auto-copy action.

Automatic copying of calculations when more data is added

This is very useful. If more data is added, calculated columns are auto-filled.

To take advantage of this feature, make sure that you add calculated columns at the end of the raw data. This way, when you get more raw data, you can simply paste it at the bottom of the Table.

Automatic display of headings

Headings are shown in place of regular column headings. It also offers Auto-Filter dropdown (2010 onwards). This eliminates the need for Split and Freeze Pane.

Automatic copying of formatting, conditional formatting and validations

All attributes of cells are auto-copied when you add more rows in a Table.

Ability to use Table and Column names in formulas

Ability to integrate with SharePoint and Visio

You can upload an Excel table to a SharePoint site. It automatically creates a list, creates relevant columns, uploads the data to SharePoint and finally creates a one way (SharePoint to Excel) link with the data.

In Visio you can create a visualization based upon a Visio based Pivot Table functionality.

Create a presentation in One Click with Send to PowerPoint

Send to PowerPoint is an amazing feature of Word.  It has been available for many years but nobody noticed it. So Microsoft removed it from the menus in Office 2007. You need to add this menu back into your Word ribbon first.

If you are using Office 2003 or older, just go to File – Send to – Send to PowerPoint.

How to enable Send to PowerPoint feature in Word

  1. Start Word
  2. Right click on the ribbon
  3. Choose Customize Quick Access Toolbar
  4. You will see two lists. From the left side, open the dropdown which is showing
    Popular Commands. Choose All Commands
  5. Click in the list below. This shows all Word commands (buttons). This is a very long list.
  6. Type character s
  7. This will take you to the list of commands starting with character s
  8. Now press Page Down multiple times till you locate the command Send to PowerPoint
  9. Click the Add button then click Ok

Now you will have the Send to PowerPoint button in your Quick Access Toolbar.

Word to PowerPoint in ONE click

Create or open any Word document which is using styles.

image

Click on the Send to PowerPoint button.
The button looks a little different depending upon your version of Office.

Send to PowerPoint

PowerPoint will automatically create a presentation for you. Every item with Heading 1 style becomes a new slide. All other heading levels below it become bullets.

Pictures are not transferred to PowerPoint even if they have Heading style applied.

image

Few more steps…

  1. As soon as this presentation is created, go to Slide Sorter view.
  2. Press CTRL A to select all slides.
  3. From Home tab, click the Reset button.
  4. Now you can apply any other design template and use the presentation OR
  5. Copy the slides into another presentation

image

This step is required to remove the unwanted formatting which was transferred from Word to PowerPoint. If you do not perform this formatting reset operation, applying other design templates will not work properly.