星期一, 十二月 12, 2011

8 Tips to Make you a Formatting Pro

From chandoo.org
8 Tips to Make you a Formatting Pro:

We can take any Excel workbook and format it until Christmas, and we would still not be done. But not many of us have so much of time or energy. So, today, lets talk formatting.


1. Use tables to format data quickly


Introduced in Excel 2007, Excel Tables are an incredibly powerful way to handle a bunch of related data. Just select any cell with in the data and press CTRL+T and then Enter. And bingo, your data looks slick in no time.


Use tables to format data quickly


Learn more about Excel Tables.


2. Change colors in a snap


So you have made a spreadsheet model or dashboard. And you want to change colors to something fresh. Just go to Page Layout ribbon and choose a color scheme from Colors box on top left. Microsoft has defined some great color schemes. These are well contrasted and look great on your screen. You can also define your own color schemes (to match corporate style). What more, you can even define schemes for fonts or combine both and create a new theme.


Use color schemes to change formatting quickly


3. Use cell styles


Consistency is an important aspect of formatting. By using cell styles, you can ensure that all similar information in your workbook is formatted in the same way. For example, you can color all input cells in orange color, all notes in light gray etc.


Apply consistent formatting with cell styles in Excel


To apply cell styles, just select all the cells you want to have same style and from Home ribbon, select the style you want (from styles area).


Learn how to use cell styles in Excel.


4. Use format painter


Format painter is a beautiful tool part of all Office programs. You can use this to copy formatting from one area to another. See below demo to understand how this works. You can locate format painter in the Home ribbon, top left.


Use format painter to format data quickly


5. Clear formats in a click


Sometimes, you just want to start with a clean slate. May be it is that colleague down the aisle who made an ugly mess of the quarterly budget spreadsheet. (Hey, its a good idea to tell him about Chandoo.org) So where would you start?


Clear formatting of a cell (or range) in a snap


Simple, just select all the cells, and go to Home > Clear > Clear Formats. And you will have only values left, so that you can format everything the way you want.


6. Formatting keyboard shortcuts


Formatting is an everyday activity. We do it while writing an email, making a workbook, preparing a report, putting together a deck of slides or drawing something. Even as I am writing this post, I am formatting it. So knowing a couple of formatting shortcuts can improve your productivity. I use these almost every time I work in Excel.



  • CTRL + 1: Opens format dialog for anything you have selected (cells, charts, drawing shapes etc.)

  • CTRL + B, I, U: To Bold, Italicize or Underline any given text.

  • ALT+Enter: While editing a cell, you can use this to add a new line. If you want a new line as part of formula outcome, use CHAR(10), and make sure you have enabled word-wrap.

  • ALT+EST: Used to paste formats. Works like format painter (#4)

  • CTRL+T: Applies table formatting to current region of cells

  • CTRL+5: To strike thru.

  • F4: Repeat last action. For example, you could apply bold formatting to a cell, select another and hit F4 to do the same.


7. Formatting options for print


What looks great on your screen might look messed up, if you do not set correct print options. That is why, make sure that you know how to use these print settings. All of these can be accessed from Page Layout ribbon. For more, you can also use print preview and then “page settings” button.


Formatting options for printing


8. Do not go overboard


Formatting your workbook is much like garnishing your food. No amount of plating & garnishing is going to make your food taste good. I personally spend 80% of time making the spreadsheet and 20% of time formatting it. By learning how to use various formatting features in Excel & relying on productive ideas like tables, cell styles, format painter & keyboard shortcuts, you can save a lot of time. Time you can use to make better, more awesome spreadsheets.


What are your favorite formatting tips?


Formatting (or making something look good) helps you get great first impression. I am always looking for ways to improve my formatting skills. While a great deal of formatting skill is art (and personal taste), there are several ground rules to follow as well. Applying ideas like consistency, alignment, simplicity and vibrancy goes a long way.


What formatting tips & ideas you follow? Please share them with us using comments.


Learn how to make better spreadsheets



Join Excel School & Make awesome Excel sheets


In my Excel School program, we focus not just on teaching Excel, but also teaching you how to make awesome Excel workbooks. You can see how I format my data, charts, dashboards & reports and learn hundreds of tips on formatting.


Even the lesson workbooks are beautifully formatted & packed with fresh ideas for you to try.


Consider joining our Excel School program, because you want to be awesome in Excel.




星期日, 十二月 11, 2011

Copy Data to Another Worksheet with Advanced Filter

From Excel Semi-Pro
Copy Data to Another Worksheet with Advanced Filter:

Dear Microsoft, please fix the Advanced Filter in Excel. Copying filtered data to another worksheet should be simple but it’s not. Fixing this would help out many of your beginning and intermediate users and some of us old dogs who seemingly haven’t learned the trick.


The Problem with Advanced Filter in Excel


I was reading a post on the Contextures Blog, which indicated that you could use the Advanced Filter feature in Excel to copy filtered data to another worksheet. This feature has the potential to shorten some of my VBA code that essentially does the same thing. I mean, using Excel to do the work is simpler and usually faster than writing the code yourself.


So I created a simple worksheet with dummy data and tried out the Advanced Filter feature. In the picture below my List Range and Criteria Range are on Sheet1 and I’m just about to Copy to another location: Sheet2.


Advanced Filter Copy to Another Sheet


However, when I click the OK button the following message pops up.


Advanced Filter Warning


The Trick to Copy Filtered Data to Another Worksheet


My problem was that I didn’t know the secret. You have to initiate the Advanced Filter from the worksheet you are going to copy to. Duh, stupid me. So here’s how I defeated my nemesis, the Advanced Filter.



  1. Activate sheet 2 (where the data goes)

  2. Choose Data > Advanced Filter

  3. Select the List Range on sheet 1

  4. Select the Criteria range on sheet 1

  5. Select the radio button: Copy to another location

  6. Select the Copy to range on sheet 2

  7. Click OK


Here is the resulting data copied to Sheet 2.


Advanced Filter Results


There is a short video from Debra Dalgleish on how this is done. I’m too frustrated with Microsoft to pull off a video without disdain in my voice.


The problem I’m having is that this “work around” has been required for quite some time, with no updating of the Excel software code by Microsoft. (The video link above is for Excel 2003.) And yet in the latest two versions of Excel, 2010 and 2011, we still have to do something, that seems to me to be, completely counter-intuitive and un-productive.


Advanced Filter with VBA


I turned on the macro recorder to document the code required to execute, what I’m calling a “work around.” I then copied the first macro, modified the code, and ran it again from sheet 1 and it worked just fine.


Advanced Filter VBA Code


The first macro: CopyToOtherSheet does two things. 1) Selects Sheet 2 because that is what Microsoft requires, then 2) uses the AdvancedFilter method of the Range property to FilterCopy the CriteriaRange to the CopyToRange, with no Unique records.


The second macro: FilterCopyToOtherSheets only does one thing. It does what Microsoft should have done long ago, and that’s to copy the filtered range (sheet 1) to the copy range (sheet 2) while your on sheet 1.


The only code I changed (highlighted in red) was to eliminate the selection of Sheet 2, and add Sheets(“Sheet2″). to the CopyToRange. You can run this macro from Sheet 1 and the Advanced Filter will copy the filtered data to Sheet 2 with no problems.


Of course with static ranges this is a very limited macro, but my point here is that the code change should be minimal and if Microsoft can spend several billion dollars to get Windows 7 into Nokia phones, this shouldn’t cost to much to fix.


Okay, I’m done ranting.


Helpful Links


Excel’s Advanced Filter Help Online




Excel AutoFilter or Advanced Filter?

From Contexture.com
Excel AutoFilter or Advanced Filter?:

filterclog Do you ever use the Excel Advanced Filter feature? Or is all your filtering done with an AutoFilter?


AutoFilter Benefits


For ease of use, it’s hard to beat the Excel AutoFilter feature. Just click the Filter command on the Excel Ribbon’s Data tab, and the filter is ready to go.


FilterAdvAuto01


You can click the drop down arrows in the column headings, and use the check boxes to select the items you want in the filter. Or, use the Text, Date or Number Filters commands, for variations on the filters.


filteradvauto02


Another quick way to filter is to right-click on a cell in the list, then click Filter, and click Filter by Selected Cell’s Value.


filteradvauto03


Advanced Filter Benefits


The Excel Advanced Filter isn’t as easy to use (I guess that’s why they call it Advanced ;-) ), but it does have some benefits that make it worth the effort.


After you click the Advanced command on the Excel Ribbon’s Data tab, the Advanced Filter dialog box opens. Fill in the details, and then click the OK button to filter the data.


advancedfilter04


Filter Data to Anther Sheet

The main reason that I use an Advanced Filter, especially when programming in Excel, is that it’s a quick and efficient way to copy specific data to a different worksheet.


In the screen shot above, the option is selected to copy the filtered data to another location. You can use that option to quickly create a report for each department, or salesperson, and email the results.


Create a List of Unique Items

Excel 2007 introduced the Remove Duplicates feature, but I still use an Advanced Filter to create lists of unique items. The Remove Duplicates feature strips the duplicates out of the list that is selected, so you have to remember to work on a copy of the list, if you want to keep the original list intact.


With an Advanced Filter, no items are removed from the list, so you don’t risk losing any of your original data.


Complex Filters

With an Advanced Filter, you can create a criteria range on the worksheet, and see at a glance what the filter settings are. You can also create complex filters with AND/OR settings that go beyond what an AutoFilter can do.


For example, with an AutoFilter, you can select two specific customers, and two products for those selected customers.


filteradvauto04


With an Advanced Filter, you can create OR conditions between columns, such as Customer A OR Product B — you can’t do that in an AutoFilter!


filteradvauto05


_________