Search This Blog

Thursday 24 January 2013

How to Create Pivot Tables in Excel

Click on the Data menu and choose Pivot Table and PivotChart Report. (Note: in Excel 2007/2010 go to Insert>PivotTable)


Set your options in the prompt as below

Specify the location of the data you are going to summarize. If you have your data in an Excel list that is currently open, Excel will automatically select the cell range. Click "Next."

Ensure the New Worksheet option is selected after you click Next from the previous step. Once you've done that, click "Finish."




If necessary, adjust the range in the Table/Range text box. This is located under the "Select a Table" option button. If the data source for your pivot table is an external database table created with a separate program, such as Access, click the "Use an External Data Source" option button. Click the "Choose Connection" button and then click the name of the connection in the Existing Connections dialog box.

Select the location for the pivot table. Excel's default mode builds the pivot table on a new worksheet it adds to the workbook. To make the pivot table appear on the same worksheet, click the "Existing Worksheet" option button. Indicate the location of the first cell of the new table in the "Location" text box.

Click OK. Excel should add a new blank grid for the pivot table and display a PivotTable Field List task pane. This panel will be divided into two sections.

1)"Choose fields to add to report" list box with the names of all the fields in the source data for the pivot table.
2)An area divided into four drop zones at the bottom: Report Filter, Column Labels, Row Labels and Values.

Assign the fields in the PivotTable Field List task pane to the various parts of the table. Drag a field name from the "Choose fields to add to report" list box into one of the four drop zones.

Manipulate the pivot table as needed until your ideal results appear.

Parts of a Pivot Table

Report filter: This area contains the fields that enable you to page through the data summaries shown in the pivot table by filtering out sets of data. They act as the filters for the report. For example, if you designate the Year field from a table as a Report Filter, you can display data summaries in the pivot table for individual years or for all years represented in the table.

Column labels: This area contains the fields that determine the arrangement of data shown in the columns of the pivot table.

Row labels: This area contains the fields that determine the arrangement of data shown in the rows of the pivot table.

Values: This area contains the fields that determine which data are presented in the cells of the pivot table — they are the values that are summarized in its last column (totaled by default).

Page field: A field from the source data that you assign to a page (or filter) orientation in a Pivot Table report.

Data field. A field from the source data that contains values to be summarized. For example, Sum of Sales is a data field.

Column field: A field from the source data that you assign to a column orientation in a Pivot Table report. For example, Type is a column field.

Item: A subcategory of a row, column, or page field.

Row field: A field from the source data that you assign to a row orientation in a Pivot Table report. For example, Region and Salesperson are row fields.

Data area: The cells in a Pivot Table report that contain summarized data.

Wednesday 23 January 2013

How to remove/hide duplicate rows

To Remove duplicate rows:
Select the table containing duplicated rows, click Data on the toolbar-->Click Remove Duplicates
Select the columns to include in identifying duplicates, click OK. This deletes away all the repeated rows


To just Hide duplicate rows
Select the table containing duplicated rows, , click Data on the toolbar-->Filter-->Advanced
Check Unique records Only and Click Ok.

To unhide, just click Clear beside Filter






Tuesday 22 January 2013

How to create a drop down list

You need to have a list of values first

For my example I created a separate sheet with just two cells Yes and No



To force a cell to accept only Yes/No, click the cell, click Data on the toolbar and click Data Validation.
On the pop up, choose List from Allow: and choose the two cells containing 'Yes' and 'No' as Source:
See below screen.

Click ok and you are done, you can apply the drop down to other cells as well by copying and pasting.


Note: In older versions Excel 2003 and below, the source of the list (Cells of Yes/No in this case) must be in the same sheet as the drop down, kind of weird.

Monday 21 January 2013

Humour: Some cells and ranges that you may have heard about


Just for laughs

Some cells and ranges that you may have heard about:
A1The steak sauce cell
IM21The legal drinking age cell
K9The dog cell
AK47The assault weapon cell
IV2The second intravenous solution cell
B9The malignant cell
HI5The alternate handshake cell
AH:HAThe discovery range
F16The fighter jet cell
AM:FMThe radio range
ET2The Brute' cell
AW42The root beer for two cell
BU:BUThe erroneous range
BY:BYThe farewell range
IC2The double-vision cell
IQ100The average intelligence cell
HO:HOThe Santa Claus range
GO2The destination cell
FU2The same to you cell
EX2The second former spouse cell
CU8The oil-rich country cell
BU10The shirt fastener cell
BC49:BD1The '96 Presidential Election results range
AG1:GB1The '00 disputed Florida vote range
T42The old soft-shoe cell
U2The Irish rock group cell
BI123The Lotus marketing slogan cell
C4The explosive cell
V8The vegetable juice cell
R2:D2The android range
I1:U1The tied game cell
AP:ESThe Simian range
H8:U2The ex-wife range
IN2:CA9The dog-lover range
AC:DCThe electric range
D84:U2The double date range
I12:CU2The "when can we meet" cell

How to get classic pivot table view in Excel 2010

For those of you who are used to pivot tables in Excel 2003/2007 like me, these are the steps to get the classic look for pivot tables in Excel 2010. I don't know about you but I still like the familiar look and feel from Excel 2003.


Difference between the new and classic pivot table: The new version group the Row Labels together (I don't usually want that)



Right click ON the pivot table --> PivotTable Options


Click Display tab and check Classic PivotTable layout




We are not done yet, if you want to see merged cells for grouped rows:
Click ON the Pivot table again--> Click Design on tool bar



On PivotTable Styles, click on the bottom down arrow to expand all styles and click Clear
There you have it! Classic pivot table view









Wednesday 16 January 2013

How to select table quick

One way is to drag from the upper left corner of the table to the bottom right corner, but what if the table has 60,000 rows?

Don't worry, Ctrl + *

Selects the current region around the active cell, enclosed by blank rows and blank columns.

How to get first day of the month

Using the DATE function

=DATE(YEAR(TODAY()), MONTH(TODAY()), 1)

You can replace TODAY() to get first day of any date