0% found this document useful (0 votes)
178 views156 pages

Excel Session - Final - For - Attendees

This document provides an overview of an introductory session on Microsoft Excel. It outlines the main topics that will be covered, including an introduction to the Excel interface, worksheets, cells, basic formulas, formatting, charts and more. Facilitated by Arun, the session will span 156 pages and provide participants with foundational Excel skills and knowledge.

Uploaded by

LakshmiReddyK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views156 pages

Excel Session - Final - For - Attendees

This document provides an overview of an introductory session on Microsoft Excel. It outlines the main topics that will be covered, including an introduction to the Excel interface, worksheets, cells, basic formulas, formatting, charts and more. Facilitated by Arun, the session will span 156 pages and provide participants with foundational Excel skills and knowledge.

Uploaded by

LakshmiReddyK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 156

Welcome to a session on Microsoft Excel

by

Facilitated by Arun

Page 1 of 156
OFFICE
BUTTON

NAME
CELL

ROW NO

COLUMN
NAME

ACTIVE
CELL

WORKSHE
ET SCROLL

NORMAL SCREEN
WORK
SHEET
NAME
MINIMIZE RESTORE
HELP CLOSE
WINDOW
RESTORE
CLOSE
PARTICU
LAR FILE
EXPAND
FORMULA
BAR
SPLIT
FORMULA BUTTON

SCROLL
BUTTON

HORIZON
TAL
SCROLL

HORIZONTAL
SPLIT

NORMAL SCREEN ZOOM BOX


PAGE LAYOUT PAGE BREAK PREVIEW
123

15

138

what 's
this
18000000000

16000000000

14000000000

12000000000

10000000000

Column B
8000000000

6000000000

4000000000

2000000000

0
1 2 3 4 5 6 7
Unformatted Type Formatted
1200 Currency £ 1,200.00
0.231 Percentage 23.10%
41618 Short Date 10-Dec-13 1200

42351 Long Date ### 1200


0.552 Time 1:14:53 PM 1200
0.25 Fraction 1/4 1200
17100000000 Scientific 1.71E+10

asd
Rs. 1,200.00
23%
Currency 1200 0 12/10/2013
Question
###
copy the values in b4:b10 to d4:d10 and format them as per the type in
c4:10 1:14:53 PM
1/4
1.71E+10
Loan Payment Calculator
Loan Amount: $ 15,000.00
Annual Interest Rate: 6.25%
Payment Period (months): 1

Number of Periods: 48
Payment per Period: $ 354.00

Single Period Calculation


Enter a Period: 1
Principal Amount $ 275.87
Interest Amount $ 78.13

Question

format the range b3:c13 to look like the data rangef3


Loan Payment Calculator
Loan Amount: $15,000.00
Annual Interest Rate: 6.25%
Payment Period (months) 1

Number of Periods: 48
Payment per Period: $354.00

Single Period Calculation


Enter a Period: 1
Principal Amount $275.87
Interest Amount $78.13

o look like the data rangef3:h13


Rs. 1,200.00
23%
12/10/2013

###
1:14:53 PM
1/4
1.71E+10
10
20
30
40 Multiplies 150 times 0.05.
50 Adds the values in cells A1 and A2.
60
70 Adds the values in the range A1:A12.
80 Compares cell A1 with cell C12.
90
100
110
Income 10000
Expenses 8000

Formula
=”Part-”&”23A”
=6^3
=216^(1/3)
=A1<A2
=A1<=A2
=A1<>A2
Question

Try out the formula in column e4:e8


=150*.05
=A1+A2
=Income–Expenses
=SUM(A1:A11)
=A1=C12

Question 11
Try out the formula in column d19:d24

What It Does Result


Joins (concatenates) the two text strings to produce Part- PART-23A
Raises 6 to the third power (216). 216
Returns the cube root of 216 (6). 6
Returns TRUE if the value in cell A1 is less than the value in cell A2. 1
Returns TRUE if the value in cell A1 is less than or equal to the value in cellA2. Otherwise, it returns FALSE. 1
Returns TRUE if the value in cell A1 isn’t equal to the value in cell A2.Otherwise, it returns FALSE. 1
7.5
30
2000
660
0

PART-23A
Rs. 1,200.00
23%
12/10/2013
###
1:14:53 PM
1/4
1.71E+10
Item Quantity Price Total ( quan * price)
Chair 4 $125.00 $500.00
Desk 4 $695.00 $2,780.00
Lamp 3 $39.95 $159.80

Item Quantity Price Sales Tax (quan * price *sales tax) Total ( quant* price + sales tax)
Chair 4 $125.00 $37.50
Desk 4 $695.00 $208.50
Lamp 3 $39.95 $8.99

Sales Tax: 7.50%

Width
1.0 2.0 3.0
2.0 2.0 4.0 6.0
Length

4.0 4.0 8.0 12.0


6.0 6.0 12.0 18.0
8.0 8.0 16.0 24.0
10.0 10.0 20.0 30.0
relative reference

absolute reference

4.0
8.0
16.0 Mixed reference
24.0
32.0
40.0
Item Quantity Price Total ( quan * price)
Chair 4 $125.00
Desk 4 $695.00
Lamp 3 $39.95

Item Quantity Price Sales Tax (quan * price *sales tax) Total ( quant* price + sales tax)
Chair 4 $125.00
Desk 4 $695.00
Lamp 3 $39.95

Sales Tax: 7.50%

Width
1.0 2.0 3.0
2.0
Length

4.0
6.0
8.0
10.0
relative reference

absolute reference

4.0

Mixed reference
Category Function
Logical 1
Logical OR
Logical NOT
Logical IFERROR*
Logical IF
Logical 0
Logical AND
Description New
Returns the logical value TRUE 0
Returns TRUE if any argument is TRUE 0
Reverses the logic of its argument 0
Returns a different result if the first argument evaluates to an error 1
Specifies a logical test to perform 0
Returns the logical value FALSE 0
Returns TRUE if all its arguments are TRUE 0
Category Function
Text VALUE
Text UPPER
Text TRIM
Text TEXT
Text T
Text SUBSTITUTE
Text SEARCH
Text RIGHT
Text REPT
Text REPLACE
Text PROPER
Text MID
Text LOWER
Text LEN
Text LEFT
Text FIXED
Text FIND
Text EXACT
Text DOLLAR
Text CONCATENATE
Text CODE
Text CLEAN
Text CHAR
Text BAHTTEXT
Description
Converts a text argument to a number
Converts text to uppercase
Removes excess spaces from text
Formats a number and converts it to text
Returns the text referred to by value
Substitutes new text for old text in a text string
Finds one text value within another (not case sensitive)
Returns the rightmost characters from a text value
Repeats text a given number of times
Replaces characters within text
Capitalizes the first letter in each word of a text value
Returns a specific number of characters from a text string, starting at the position you speci
Converts text to lowercase
Returns the number of characters in a text string
Returns the leftmost characters from a text value
Formats a number as text with a fixed number of decimals
Finds one text value within another (case sensitive)
Checks to see whether two text values are identical
Converts a number to text, using currency format
Joins several text items into one text item
Returns a numeric code for the first character in a text string
Removes all nonprintable characters from text
Returns the character specified by the code number
Converts a number to Baht text
New
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Category Function
Date & Time YEARFRAC
Date & Time YEAR
Date & Time WORKDAY
Date & Time WEEKNUM
Date & Time WEEKDAY
Date & Time TODAY
Date & Time TIMEVALUE
Date & Time TIME
Date & Time SECOND
Date & Time NOW
Date & Time NETWORKDAYS
Date & Time MONTH
Date & Time MINUTE
Date & Time HOUR
Date & Time EOMONTH
Date & Time EDATE
Date & Time DAYS360
Date & Time DAY
Date & Time DATEVALUE
Date & Time DATE
Description
Returns the year fraction representing the number of whole days between start_date and end_date
Converts a serial number to a year
Returns the serial number of the date before or after a specified number of workdays
Returns the week number in the year
Converts a serial number to a day of the week
Returns the serial number of today’s date
Converts a time in the form of text to a serial number
Returns the serial number of a particular time
Converts a serial number to a second
Returns the serial number of the current date and time
Returns the number of whole workdays between two dates
Converts a serial number to a month
Converts a serial number to a minute
Converts a serial number to an hour
Returns the serial number of the last day of the month before or after a specified number of months
Returns the serial number of the date that is the indicated number of months before or after the start date
Calculates the number of days between two dates, based on a 360-day year
Converts a serial number to a day of the month
Converts a date in the form of text to a serial number
Returns the serial number of a particular date
New
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Category Function Description
Statistical RANK Returns the rank o
Statistical MODE Returns the most c
Statistical MINA Returns the minimum
Statistical MIN Returns the minimum
Statistical MEDIAN Returns the median
Statistical MAX Returns the maximum
Statistical LARGE Returns the kth lar
Statistical FREQUENCY Returns a frequency
Statistical FORECAST Returns a value alo
Statistical COUNTIFS* Counts the number o
Statistical COUNTIF Counts the number o
Statistical COUNTBLANK Counts the number
Statistical COUNTA Counts how many va
Statistical COUNT Counts how many nu
Statistical AVERAGEIFS* Returns the average
Statistical AVERAGEIF* Returns the average
Statistical AVERAGEA Returns the average
Statistical AVERAGE Returns the averag
Math & Tri SUMPRODUCT Returns the sum of
Math & Tri SUMIFS* Adds the cells speci
Math & Tri SUMIF Adds the cells speci
Math & Tri SUM Adds its arguments
New
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
1
0
0
Category Function Description
Information TYPE Returns a number indicating the data type of a value
Information NA Returns the error value #N/A
Information N Returns a value converted to a number
Information ISTEXT Returns TRUE if the value is text
Information ISREF Returns TRUE if the value is a reference
Information ISODD Returns TRUE if the number is odd
Information ISNUMBER Returns TRUE if the value is a number
Information ISNONTEXT Returns TRUE if the value is not text
Information ISNA Returns TRUE if the value is the #N/A error value
Information ISLOGICAL Returns TRUE if the value is a logical value
Information ISEVEN Returns TRUE if the number is even
Information ISERROR Returns TRUE if the value is any error value
Information ISERR Returns TRUE if the value is any error value except #N/A
Information ISBLANK Returns TRUE if the value is blank
Information INFO Returns information about the current operating environment
Information ERROR.TYPE Returns a number corresponding to an error type
Information CELL Returns information about the formatting, location, or contents of a cell
New
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Category Function
Lookup & Reference VLOOKUP
Lookup & Reference TRANSPOSE
Lookup & Reference RTD
Lookup & Reference ROWS
Lookup & Reference ROW
Lookup & Reference OFFSET
Lookup & Reference MATCH
Lookup & Reference LOOKUP
Lookup & Reference INDIRECT
Lookup & Reference INDEX
Lookup & Reference HYPERLINK
Lookup & Reference HLOOKUP
Lookup & Reference GETPIVOTDATA
Lookup & Reference COLUMNS
Lookup & Reference COLUMN
Lookup & Reference CHOOSE
Lookup & Reference AREAS
Lookup & Reference ADDRESS
Description
Searches for a value in the leftmost column of a table and then returns a value in the same row from a column you specify
Returns the transpose of an array
Returns real-time data from a program that supports COM automation
Returns the number of rows in a reference
Returns the row number of a reference
Returns a reference offset from a given reference
Returns the relative position of an item in an array
Returns a value either from a one-row or one-column range or from an array
Returns a reference indicated by a text value
Uses an index to choose a value from a reference or array
Creates a shortcut that opens a document on your hard drive, a server, or the Internet
Searches for a value in the top column of a table and then returns a value in the same column from a row you specify in th
Returns data stored in a PivotTable
Returns the number of columns in a reference
Returns the column number of a reference
Chooses a value from a list of values
Returns the number of areas in a reference
Returns a reference as text to a single cell in a worksheet
New
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Reference Sheet

Topic Description Sheet Reference Question No.


Array multiplication Multiplying arrays of same orientation Summarising based on conditions 2
Array multiplication Multiplying 2 arrays of different orientation Miscellaneous 6
Condition testing One Basics 1
Condition testing Multiple Basics 1
Condition testing Multiple (AND) conditions Basics 2
Condition testing Multiple (OR) conditions Basics 3
Formatting Centre across selection Basics 4
Data Extraction techniquesSplit data into columns Basics 6
Data conversion Cleansing data Basics 10
Sum Sum ignoring text Basics 12
Conditional formatting Basic conditional formatting (comparison in one co Vlookup() and cond. format 1
Conditional formatting Conceal error values Vlookup() and cond. format 2
Conditional formatting Apply conditional formatting across worksheets Miscellaneous 18
Count Count unique values Summarising based on conditions 11
Count Count based on multiple conditions Summarising based on conditions 5
Count Count alphanumeric strings in a range Miscellaneous 3
Count Count based on one condition (where the source wor Summarising based on conditions 6
Data Extraction techniquesDealing with all AND conditions Data Querying 1
Data Extraction techniquesDealing with a combination of AND/OR conditions Data Querying 2
Data Extraction techniquesWorking with formulas in advanced filters Data Querying 3
Data Extraction techniquesTransfer selected columns to a another range Data Querying 5
Data Extraction techniquesFilter unique records Duplicates and Uniques 1
Data Extraction techniquesFilter records which appear once only Duplicates and Uniques 2
Data Extraction techniquesFilter records to a separate worksheet/workbook Duplicates and Uniques 3
Data Extraction techniquesCount unique values Duplicates and Uniques 4
Data Validation Simple data validation list Validation & subtotals 1
Data Validation Preparing a secondary data validation list Validation & subtotals 1
Data Validation Preparing a secondary data validation list when spacValidation & subtotals 1
Data Validation Validate a cell with source range which is in anotherValidation & subtotals 3
Dealing with Dates Display in proper date format Dealing with Dates 1
Dealing with Dates Identify and correct for non date entries Dealing with Dates 2
Page 34 of 156
Reference Sheet

Topic Description Sheet Reference Question No.


Dealing with Dates Sentence formulation with date entry Dealing with Dates 3
Data Extraction techniquesFilter numbers beginning with Basics 9
Graphs Creating a 2 y-axis chart Graphs 1
Graphs Creating a column chart where dates are on the x aGraphs 2
Graphs Solving the problem of overlapping legends in a pie Graphs 3
Graphs Accommodating multiple data points on a pie chart Graphs 4
Graphs Customising the "Other" data label in a bar of pie chGraphs 5
Graphs Changing bar/column colour based on values Graphs 6
Graphs Doughnut charts Graphs 7
Graphs Disproportionately sized column/Bar charts Graphs 8
Graphs Showing data labels on Stacked column charts Graphs 9
Graphs Ignore missing data points in line charts Graphs 10
List (Table in Excel 2007) Auto expanding range (rows) Vlookup() and cond. format 4
List (Table in Excel 2007) Run multiple auto filters on one worksheet Data Querying 4
Lookup Techniques Simple VLOOKUP() Vlookup() and cond. format 1
Lookup Techniques Dynamically determine the column index in a VLOOK Vlookup() and cond. format 3
Lookup Techniques Lookup in ascending range (Lookup largest value lesVlookup() and cond. format 5
Lookup value not in the first column of the table
Lookup Techniques array Vlookup() and cond. format 6
Lookup Techniques Lookup value split across multiple columns Vlookup() and cond. format 7
Lookup Techniques Dynamic transposing using HLOOKUP()/VLOOKUP() Miscellaneous 5
Lookup Techniques Lookup first value and last value for every row Vlookup() and cond. format 8
Lookup Techniques Lookup value split across sheets Vlookup() and cond. format 9
Masking numeric entries Masking numeric values with user desired input Basics 5
Masking numeric entries Masking numeric values with user desired input What-If analysis 3.1
Number appearance Display number as desired by user What-If analysis 3.1
Protection Protecting a cell Wksheet & Wkbook protection 1
Protection Protecting a cell such that the formula is not visible Wksheet & Wkbook protection 2
Protection Preventing a user from unhiding a sheet Wksheet & Wkbook protection 3

Page 35 of 156
Reference Sheet

Topic Description Sheet Reference Question No.


Preventing a user from deleting/inserting
rows/columns in
Protection a specific range Wksheet & Wkbook protection 4
Sorting Perform a custom sort Basics 8
Sum Sub totals and Grand total in a large range Validation & subtotals 2
Sum Sum/Count based on one condition (One column) Summarising based on conditions 1
Sum Sum based on one condition (Wildcard) Miscellaneous 3
Sum Sum based on one condition (Multiple columns) Summarising based on conditions 8
Sum Sum based on multiple conditions Summarising based on conditions 3
Lookup Techniques VLOOKUP based on multiple conditions Summarising based on conditions 4
Sum Sum based on AND/OR conditions (2 OR conditions)Summarising based on conditions 7
Sum Sum a range which has numbers and error values Summarising based on conditions 9
Sum Sum based on one condition (where the source work Summarising based on conditions 6
Sum from a fixed starting point till a specific user
defined
Sum location e.g. YTD sales Summarising based on conditions 10
Sum Sum visible cells Miscellaneous 1
Sum Sum monthly revenue Summarising based on conditions 12
Transpose Impact of change
Static and dynamicintransposing
multiple cells on a resultant Miscellaneous 5
What-If Analysis Impact
cell of change
Back Calculate in one
(using variable
Goal Seek) on a resultant What-If analysis 1
What-If Analysis Impact
cell of Manager)
(Scenario change in two variables on a resultant What-If analysis 2
What-If Analysis Impact
cell of change in
(One way Data Table) multiple variables on a What-If analysis 3.1
What-If Analysis resultant
(Two waycellData Table) What-If analysis 3.2
What-If Analysis (One way Data Table) What-If analysis 4.1

Page 36 of 156
Question 1 - Result based on a condition
Marks - Marks - Performanc Result in
Name 2008 2007 e in 2008 2008 Question 1 (a)
Ashish 10 6 GOOD GOOD In D6:D8, get the output as Good or Poor. If the score in column B is
Sanjay 5 15 POOR greater than the score in column C, the output is Good, else Poor.
Sameer 4 14 POOR

Fail 3
Fair 6 Question 1 (b)
In E6:E8, get the output as Fail, Fair or Good. If the score in column
An IF() function is used when the output has to be based on a certain condition/set of B <= the number in cell B10, then the output is Fail, if it is between
conditions. the number in B10 and B11, then the output is Fair, else Good.

Question 2 - Satisfaction of > 1 condition


Does the
Upper value fall in Question 2
Lower limit Limit the range
0 9 No The output in C19:C22 should be Yes or No depending upon
10 19 Yes whether the number mentioned in B24 falls between the numbers
specified in the lower and upper limit columns.
20 29 No
30 39 No

Value 15.4

Page 37 of 156
Question 3 - Satisfaction of 1 condition
Eligible for Eligible for
discount discount Question 3 (a)
Passenger Destination (Method 1) (Method 2) Method 3
In D28:D29, the output should be Yes or No depending upon the
A Mumbai Eligible Eligible Eligible destination in column C is one of the destinations mentioned in
B Chennai Not eligible Not eligible Not eligible A32:A34

Destinations eligible for discounted fares


Mumbai
Pune Question 3 (b)
Delhi
In E28:E29, the output should be Yes or No depending upon the
destination in column C is one of the destinations mentioned in
For creating a log sheet of all array formulas in a workbook, refer to the following solution on my A32:A34. The destinations eligible for a discount could be more
website - http://www.ashishmathur.com/create-a-log-sheet-of-all-array-formulas-in-a-workbook/ than 3.

Question 4 - Centering across columns


US$ mn 2008 2009
Q1 Q2 Q1 Q2 Question 4
Revenue 100 150 234 561
Clarify the years in which the quarters fall.

Question 5 - User defined display


US$ mn 2010A 2011A 2012A 2013A
Revenue 123 124 125 126 Question 5

Suffix "A" after historical years and "F" after projected years.

Page 38 of 156
Question 6 - Data parsing into columns
Ashish MathurAshish Mathur
Ravi Prasad Ravi Prasad Question 6

Segregate the first and surnames in different columns.

Question 7 - Data parsing into rows

Brand Type Brand Type Question 7


Mahindra Truck/Car/SUV
Segregate the data under Type column in different rows. So
TATA Truck/Bus/Car/SUV Mahindra should appear in three rows in column A and Truck, Car
Maruti Car/SUV and SUV should also appear in three rows of column B.

For a Macro based colution of this problem, you may refer to the
following link on my website - http://www.ashishmathur.com/performing
a-text-to-rows-operation/

Question 8 - Replace 49 with value in cell E74


60,270 51
30,380 Please be careful before Question 8
24,500 you copy and paste
formulas down and Edit the multiplier from 49 to value enter by end user in cell E74.
across.

Question 9 - Custom Sort

Original data Sorted data


Product Size Product Size Question 9
Accessories Small Accessories Small
This company sells two products - Apparels and
Accessories Small Accessories Small Accessories. Apparels and Accessories each have four
sizes - Small, Medium, Large and XL.
Page 39 of 156
Sort by product (ascending order) and then sort by size
in order of Small, Medium, Large and XL.
Question 9

This company sells two products - Apparels and


Accessories. Apparels and Accessories each have four
Accessories Large Accessories Large sizes - Small, Medium, Large and XL.
Apparels Small Apparels Small
Sort by product (ascending order) and then sort by size
Apparels Small Apparels Small in order of Small, Medium, Large and XL.
Apparels Medium Apparels Medium
Apparels Large Apparels Large
Apparels XL Apparels XL

Page 40 of 156
Question 10 - Filter based on condition

Part I - Tamper with original data

A/c code DescriptioAmount 1 A/c codeDescriptioAmount


100987 Travel 34 11
234567 Acco 4 Small 0
321675 Rent 454 Medium 0
12905 G&A 435 Large 1
23456 Provision 645 XL 0
123490 Taxes 87978 1 Question 10 (Part I)

Part II - Let the original data remain i.e. do not tamper with data in any column Filter the A/c code column for all numbers which begin with

A/c code DescriptioAmount condn Question 10 (Part II)


100987 Travel 34
234567 Acco 4 Filter the A/c code column for all numbers which begin with 1.
321675 Rent 454
12905 G&A 435
23456 Provision 645
123490 Taxes 87978

Page 41 of 156
Question 11 - Cleansing data

Part I - Number stored as text

One column 1 Multiple columns Question 11 (Part I) To convert multiple columns of number
1 1 1 into "numbers stored as text", refer to m
3 3 13 Convert "number stored as text" to number for one post at the following link -
and multiple columns. http://www.ashishmathur.com/convert-
4 4 34 multiple-columns-of-numbers-into-text-
5 5 5 once/

Part II - Data from mail/web


Number Check
123 124 123 Question 11 (Part II)
34 35 34
56789 56790 56789 Cleanse the data in range A127:A129 such that B127:B129 shows
the correct result.

Question 12 - Arrange Data

Current data layout


Name City State Mobile No
Ashish Delhi Delhi 981723221
Sanjay Mumbai Maharashtra 1234567
Sameer Mumbai Maharashtra 98136363
Gautam Delhi Delhi 98136363

Expected data layout


Name City State Mobile No
Ashish Delhi Delhi 981723221
Sanjay Mumbai Maharashtra 1234567
Sameer Mumbai Maharashtra 98136363
Page 42 of 156
Gautam Delhi Delhi 98136363

Question 13 - Ignoring Dr/Cr text entries in cells

Part I - Number stored as text


Particulars Amount
Revenue 100 Question 13 (Part I)
To flip minus sign from a multi column
Operating costs -20 Get the net profit in cell C158. The answer database, refer to my post at the
Interest income 12 should be 89. following link -
Interest costs -3 http://www.ashishmathur.com/flip-
minus-sign-from-right-to-left-in-a-multi-
Profit column-range/
-1
Part II - Number appears as text
Particulars
Revenue 100 cr Question 13 (Part II) To extract text from a custom formatted
Operating costs -20 dr cell, refer to my post at the following
Get the net profit in cell C166. The answer link -
Interest income 12 cr should be 89. http://www.ashishmathur.com/extract-
Interest costs -3 dr text-from-a-custom-formatted-cell/
Profit 89

Question 14 - Filtering data arranged column wise

US$ million
Clients Asia Europe America Australia Question 14
ABC Ltd 123 23 The data alongside represents revenue in US$ million from four
XYZ Ltd 12 453 1 regions. I would like to view a simple three column table
WER Ltd 23 456 showing Client, Region and Amount. My objective is to view all
those clients which give my company business worth more
than US$100 million (per region).
To convert a matrix like data layout to a tabular data layout, refer to my post Essentially, can you think of a way to convert a matrix structure
at the following link - http://www.ashishmathur.com/converting-a-matrix-
data-layout-to-a-tabular-layout/ to a table structure.

Page 43 of 156
The data alongside represents revenue in US$ million from four
regions. I would like to view a simple three column table
showing Client, Region and Amount. My objective is to view all
those clients which give my company business worth more
than US$100 million (per region).
To convert a matrix like data layout to a tabular data layout, refer to my post Essentially, can you think of a way to convert a matrix structure
at the following link - http://www.ashishmathur.com/converting-a-matrix-
data-layout-to-a-tabular-layout/ to a table structure.

Question 15 - Unhide specific row/rows

Name Question 15
A
S Rows 186, 188 and 189 are hidden. Try to unhide rows 186 and 188 only i.e. row
189 should remain hidden.
D
E
T

Question 16 - Standardise number of digits in Account codes

Account codeMethod1 Method2 Question 16


1 0001 0001 4 4
Standardise number of digits in Account code to 4 i.e. where number of digits < 4,
23 0023 0023 4 4 insert zeros before the Account code so that the length becomes 4.
901 0901 0901 4 4
2 0002 0002 4 4
45 0045 0045 4 4

Question 17 - Delete all hidden rows in a range

Particulars Amount Question 17


Revenue 57
In the data alongside, delete all hidden rows.
Other income 11

To centre data across columns, please avoid "merging cells" - it generally causes problems when sorting, filtering, summing etc. Instead use "Centre Across Selection" [Format
Cells > Alignment > Horizontal > Centre Across Selection.

Page 44 of 156
To centre data across columns, please avoid "merging cells" - it generally causes problems when sorting, filtering, summing etc. Instead use "Centre Across Selection" [Format
Cells > Alignment > Horizontal > Centre Across Selection.

Please be careful when viewing the formula bar. If you see curly brackets {} around any formula, then it means that the formula is an array formula and has been confirmed by
Ctrl+Shift+Enter as against the conventional Enter. Also, in question 3 above, we could avoid using the OR function in the array formula (Method 2) because comparison with a
range is construed as an OR condition in an array formula.

For Question 5, "A" and "E" have come via Format Cells > Number > Custom > General"A" and general"E" respectively.

For segregating names into First name, middle name and surname, refer to my solution at the following location -
http://www.ashishmathur.com/split-name-into-three-columns/

For question 7, you may also refer to Excel's Help menu. Please type in "Find or replace text and numbers on a worksheet" in the Help box and read through the content there.

To perform a custom sort (Question 8) i.e. sort neither in ascending/descending but in a custom order, perform the following steps:

1. Type the custom order in a range and then import this custom List [Tools > Options > Custom List];
2. Now select the range and sort it. Click on the Options box and in the first key sort order, select the custom list which you imported in 1 above.

A custom sort list created once in any file will remain in MS Excel i.e. the custom list so created can be used in other workbooks as well. The list will remain even if the source fi
(file from which the custom list was created) is deleted.

Page 45 of 156
Basics

re in column B is
ood, else Poor.

score in column
if it is between
else Good.

g upon
n the numbers

Page 46 of 156
Basics

ng upon the
entioned in

g upon the
entioned in
uld be more

d years.

Page 47 of 156
Basics

s.

ws. So
nd Truck, Car
B.

efer to the
ur.com/performing-

in cell E74.

s and
h have four
Page 48 of 156
n sort by size
s and Basics
h have four

n sort by size

Page 49 of 156
Basics

s which begin with 1.

in with 1.

Page 50 of 156
Basics

olumns of numbers
d as text", refer to my
link -
athur.com/convert-
numbers-into-text-at-

:B129 shows

Page 51 of 156
Basics

on from four
table
is to view all
rth more

rix structure

Page 52 of 156
on from four
table
is to view all
rth more

rix structure Basics

er of digits < 4,

election" [Format

Page 53 of 156
election" [Format
Basics

been confirmed by
comparison with a

the content there.

ven if the source file

Page 54 of 156
Basics

Question 1 - Select a range with entire blank rows and columns

Name Region Amount Department


Question 1 (Part I)
A West Ops
s 4589 Highlight/select range A7:E14.
D East 32
Information
Q Marketing
The Ctrl+End key misjudges the last used cell.
North 43
Question 1 (Part II)
345 Select all filled up cells in range A7:E14.

Page 55 of 156
Lookup techniques

Question 1 - Lookup and cond formatting


Name Marks
Ashish 60
Question 1
Sanjay 10
Sameer 20 In cell B11, obtain the marks of the person mentioned
Gautam 30 in cell A11.

Sameer 20
1. Lookup value is searched for in the first column of the table
array.
2. Last argument will almost always be 0.

Page 56 of 156
Lookup techniques

Question 2 - Dynamic column index

Name Class Marks College School


Question 2
Ashish V 10 SD A
Sanjay VI 20 CV S Populate the blank matrix in range B27:E30 with relevant
Sameer VII 30 BN D values from range B20:E23.
Mahesh VIII 40 RT F

Name School College Marks Class


Sanjay S CV 20 VI
Sameer D BN 30 VII
Mahesh F RT 40 VIII
Ashish A SD 10 V

Question 3 - Auto expanding range


Name Marks
Ashish 10 Question 3
Sanjay 20
In cell B40, determine the marks scored by the student mentioned in
Sameer 30 cell A40. The formulation should be such that news rows added
Gautam 40 beyond row 38 automatically get included in the formula.
Mahesh 50
Arun 99
geelani 95
geelani 95 To force Excel Tables to work across a closed source workbook, refer to my The auto expanding feature of Table/List
article at http://www.ashishmathur.com/force-excel-tables-to-work-across- will work even across workbooks.
workbooks/

Question 4 - Lookup in ascending range (Lookup largest value less than equal to)
Category
Client Debtor days Method1 Method2
ABC Ltd. 60 C C Question 4
XYZ Ltd. 55 B B
In range C47:C48 and D47:D48, determine the relevant category as per
Page 57 of 156 the table in range A51:C55.
Question 4 Lookup techniques

In range C47:C48 and D47:D48, determine the relevant category as per


the table in range A51:C55.
Lower Limit Upper Limit Category
0 45 A
45 60 B
60 80 C
80 90 D
90 10000 E

Page 58 of 156
Lookup techniques

Question 5 - Lookup value not in the first column of the table array
Marks Name
60 Ashish
Question 5
10 Sanjay
20 Sameer In cell B63, determine the marks of the student mentioned in cell
30 Gautam A63.
gautam 30 Be careful with lookups. Use ascending order on lookup vector.

When using the INDEX() and MATCH() functions, always remember that the For a better understanding of the LOOKUP() function, please refer to the
range references of rows in the INDEX() and MATCH() functions should be the following post on my blog - http://www.ashishmathur.com/return-an-exact-
same. If that is not the case, the output would be incorrect. value-via-the-lookup-function/

Question 6 - Lookup value split across multiple columns

Date of
Location Product Transporter dispatch Question 6
Mumbai Switches ABC 3/12/2010
In range D82:D83, determine the date of dispatch.
Gurgaon Relays ABC 5/18/2010
Delhi Switches GHT 3/25/2010
Mumbai Relays GHT 3/29/2010
Gurgaon Switches YUE 2/12/2010
Will revert to this question once we discuss content on sheet "Summarising
Date of based on conditions"
Location Product Transporter dispatch
Mumbai Relays GHT 3/29/2010
Gurgaon Relays ABC 5/18/2010

Page 59 of 156
Lookup techniques

Question 7 - Inexact matches across rows and columns

Lower age
limit 18 35 45 55 65 70 75 80
100,000 932 1,521 1,721 2,539 5,183 5,816 6,601 7,064
200,000 1,045 1,815 2,058 3,188 6,986 7,839 8,897 9,519
insured

300,000 1,447 2,289 2,524 3,903 8,563 9,608 10,905 11,668


Lower

limit

400,000 2,160 2,802 3,089 4,781 10,467 11,745 13,331 14,263


Sum

500,000 2,616 3,130 3,450 5,342 11,685 13,111 14,882 15,922

Employee ID Age Sum insured Premium column no row no


Question 7
A001 47 250,000 2,058 3 2
A002 58 150,000 2,539 4 1 Data in range C88:J92 represents an insurance p
A003 34 450,000 2,160 1 4 premium payable per Rs. 100,000 of the sum ins
A004 37 500,000 3,130 2 5 payable depends upon the insured's age and su
interpret values in C87:J87 and B88:B92, please
A005 79 300,000 10,905 7 3 In range D96 to D100, determine the insurance

Question 8 - Lookup in a non continuous range


Client Debtor days Category
ABC Ltd. 44
XYZ Ltd. 65 Question 8

In range C105:C106, determine the relevant category as per the table in


Lower Limit Upper Limit Category range A109:C113.
0 43 A
45 60 B Information
63 80 C The ranges are not continuous.
87 90 D
90 10000 E

Page 60 of 156
Lookup techniques

Question 9 - Lookup first/last value

Part I - Determine the first and last date of payment (where data area has numbers)
First date Last date
Vendor Name 4/1/2010 4/2/2010 4/3/2010 4/4/2010 4/5/2010 of payment of payment
A 12 34
S 67 45
D 55 12
E 123 12 45

Question 9 - Part I

Determine the first and last date of payment for every vendor

Part II - Determine the first and last date of payment (where data area has text values)
Date of
Most most
recent recent
Project ID 4/1/2010 4/2/2010 4/3/2010 4/4/2010 4/5/2010 status status
A001 In Progress Complete
A002 Pending Approved
A003 Not Approved
A004 Pending In Progress

Question 9 - Part II

Determine the most recent status and data of most recent status.

Part III - Count of consecutive days

Site ID 28-Jan-19 29-Jan-19 30-Jan-19 31-Jan-19 1-Feb-19 2-Feb-19 3-Feb-19 Count


Page 61 of 156
Lookup techniques

A001 1 1 0 0 1 1 1
B001 0 1 0 1 0 0 0
C001 0 1 1 1 1 1 1
D001 0 1 0 1 0 0 1

Question 9 - Part III

In the table above, 1 respresent that the cellular network was running fine on that day. 0 represents a fault in the network. In column I, one may want to
"Determine the total number of consecutive days for which the network was working fine". Please note that the counting has to happen from right to left.

Part IV - Determine the first date and last date for identical records

DG Sent from Sent to Date


Question 9 - Part IV
15 KvA Delhi Mumbai 3/12/2010
30 KvA Delhi Pune 6/15/2010 Determine the first date, last date and count in range D149:F149.
15 KvA Delhi Mumbai 4/14/2010 Criteria is specified in range A162:C162.
15 KvA Delhi Mumbai 5/14/2010

DG Sent from Sent to First date Last date Times DG set sent
15 KvA Delhi Mumbai

Question 10 - Lookup value split across sheets

Question 10

Perform a VLOOKUP where the lookup value is split across multiple worksheets or multiple workbooks. Refer workbook named "Lookup across
sheets".

To return data against all occurrences of a lookup value, kindly refer to my solution at the following link -
http://www.ashishmathur.com/lookup-where-search-string-appears-multiple-times/

To make a VLOOKUP() function run on the visible rows of a filtered range, kindly refer to my solution at the following link -
http://www.ashishmathur.com/vlookup-function-to-work-only-on-visible-cells-of-filtered-range/
Page 62 of 156
Lookup techniques
To make a VLOOKUP() function run on the visible rows of a filtered range, kindly refer to my solution at the following link -
http://www.ashishmathur.com/vlookup-function-to-work-only-on-visible-cells-of-filtered-range/

The INDEX() and MATCH() are a powerful combination of functions. To generalise, the INDEX() and MATCH() functions are typically used in situations where the
VLOOKUP() function fails i.e. where the lookup value is not in the first column of the table array.

In the MATCH() function, please remember that:


1. the lookup_array can only be one row long or one column wide;
2. The last argument will "more often than not" be 0

A note on the LOOKUP() function

1. A LOOKUP() function is very similar to the VLOOKUP() function (where the last argument of the VLOOKUP() is a 1). For both functions to work correctly, the first
column must be sorted in ascending order. If that is indeed the case,then these functions would search for the largest value less then equal to the lookup value in the
first column and return data from the corresponding column

2. The unwritten rule about lookup is that "if you specify a search value greater than the maximum value in the lookup array, the function will continue searching until
it comes to the last non-error value or last non-blank value and stops there. In that situation, it doesn't matter whether the lookup array was sorted or not since the
search value isn't found."

Page 63 of 156
Separator 1

Recap

Page 64 of 156
Dealing with Dates

Question 1 - Display in proper date format


Date-improper Date-proper
20080608 6/8/2008 08/06/2008 Question 1
20090706 7/6/2009 06/07/2009
20030601 6/1/2003 01/06/2003 In range B6:B9, display the proper date format i.e. with / or - separat
20051213 12/13/2005 13/12/2005

Question 2 - Identify and correct for non date entries


Date Is date? Date Is date?
4/5/2009 4/5/2009 1 Question 2
4-30-2009 5/6/2009 1
5/6/2009 7/24/2011 1 Convert non dates specified in D13:D17 to dates
(without using a spare column).
11/17/98 11/17/1998 1
07.24.2011 4/30/2009 1

Please note that this technique will work only in situations when the
date and month swap (during the download process) results in a non-
date entry.

Question 3 - Align dates properly

Improper Proper
January, 1 2011 January, 1 2011
Question 3
February 1 2011 February 1 2011
March 1, 2011 March 1, 2011 Convert the entries in C27:C38 to proper date entries.
April 1, 2011 April 1, 2011
May 1, 2011 May 1, 2011
June 1, 2011 June 1, 2011
July 1, 2011 July 1, 2011
August 1 2011 August 1 2011
September 1, 2011 September 1, 2011
Page 65 of 156
Dealing with Dates

October 1, 2011 October 1, 2011


November 1 2011 November 1 2011
December 1, 2011 December 1, 2011

Question 4 - Sentence formulation with a date entry


Date of invoice is 1/11/2011 11-01-2011
Question 4
Incorrect format Date of invoice is11-01-2011 In cell C43, formulate a normal English statement - Date of invoice is <date in
Correct format C41>

Question 5 - Remove time stamp

Start Date/time End Date/time 1


Question 5
3/12/2010 3/12/2010
5/12/2010 5/12/2010 Remove the time stamp from range A49:B51 (without using a spare column)
1/4/2010 1/5/2010

Page 66 of 156
Dealing with Dates

Screenshots/Steps

Question 1 - Display in proper date format

Conversion of non date to date entries - Select the entries (as a result of the filter) and go to Data > Text to columns and click
on Next two times. In the column data format section, select Date and then in the drop down select the date format of the selection

Question 2 - Identify and correct for non date entries

1. Group all non date entries together - Select the entire range and then sort the date column in ascending order
2. Identify non date entries - Go to the Custom Filter box (as shown below) and then select * in the right box

3. Conversion of non date to date entries - Same as stated in question 1 above

Question 4 - Remove time stamp

To remove time stamp from a date time entry, find for space* and leave the replace box blank

Page 67 of 156
ng with Dates

. with / or - separator.

Page 68 of 156
ng with Dates

s <date in

column)

Page 69 of 156
Validation & subtotals

Question 1 - Creating a primary and dependent validation list

Part I - Primary and dependent validation lists - forcing the correct entry in the dependent validation list
Connection Plan
Question 1 (a)

In cell A8, allow the user to enter any one of the values specified
Plans in range A12:A13.
Prepaid Postpaid
Prepaid Talk 299 plan 3G 899 plan
Postpaid Talk 349 plan 3G 1299 plan
Question 1 (b)
Talk unlimited plan
In cell B8, create a dependent validation list i.e. if the user selects
prepaid in cell A8, then allow the user to select from any of the
prepaid plans from range C12:C13.

Refer to http://www.contextures.com/xlDataVal02.html for the procedure to create dependent validation lists.

To correct for the problem of inconsistent selection in the primary and secondary validation list, kindly refer to my article at the following link

http://www.ashishmathur.com/secondary-validation-cell-entry-to-update-when-primary-validation-cell-changes/

Let's say that you create a validation list in a certain cell the source of which is A6:A9 on the same worksheet. On second thoughts, if you realise that the entries in
A6:A9 (source of the validation) are misspelt or you just want to change them to something else, then even after making changes, the existing validated cell show
you preselected entries and not the revised entries. One has to manually go the validation cell drop down and reselect.
This macro based solution, solves the problem - http://www.ashishmathur.com/automatically-change-validated-entries-when-source-of-validation-list-changes/

Page 70 of 156
Validation & subtotals

Part II - Primary and dependent validation lists - working with spaces in primary validation entries
Category Item
Product C Question 1 (C)
Product B
Apply dependent validation in cell B34.
Product C

Product A Product B Product C


Product A Variant A.1 Variant B.1 Variant C.1
Product B Variant A.2 Variant B.2 Variant C.2
Product C Variant A.3 Variant C.3
Variant C.4

To make dependent validation list vanish for a certain selection, refer to my solution at the following link - http://www.ashishmathur.com/removing-dependent-
validation-list-from-cell-for-one-case/

Page 71 of 156
Validation & subtotals

Question 2 - Subtotals and grand total


Product Amount Product Amount Product Amount
A 10 A 10 A 10 Question 2 (a)
B 20 B 20 B 20 Get subtotals in B56, B66
C 30 C 0 C and B70. Get the Grand
D 40 D 40 D 40 Total in cell B72.
E 50 E 50 E 50
F 60 F 60 F 60
Cat. A Cat. A 180 Cat. A Question 2 (b)
G 70 G 70
H 80 H 80 G 70 Get subtotals in B56, B66
and B70. Get the Grand
I 90 I 0 H 80 Total in cell B72 [without
J 100 J 100 I the SUBTOTAL(9,range)].
K 110 K 110 J 100
L 120 L 0 K 110
W 130 W 130 L 0
Question 2 (c)
M 140 M 0 W 130
P 150 P 150 M Get subtotals in E56, E66
Cat. B 990 Cat. B 640 P 150 and E70 without writing
H 160 H 160 Cat. B the formula [either
G 170 G 170 SUM() or SUBTOTAL()]
three times.
N 180 N 180 H 160
Cat. C 510 Cat. C 510 G 170
N 180
Grand total 1605 Grand total Cat. C
Grand total
Grand total

Page 72 of 156
Validation & subtotals

One of the properties of the SUBTOTAL() function is that when it is used on a Leaving blank rows/columns /cells in your data is generally a very bad
range in which there are individual SUBTOTAL() functions, it actually ignores idea. This destroys the structured nature of Excel - it sort of violates the
the cells which hold those individual SUBTOTAL() functions. spreadsheet integrity. It means that you can't use your data, in all
instances that work well with blocks of data, such as pivot table,
subtotal, auto filter, advanced filter , auto sum etc.. Presence of blank
rows/columns will require manually selecting the range anytime you
After obtaining the totals in E56, E66 and E70, if you wish to get averages want to do anything. In addition, selection techniques such as Ctrl
instead, then with the three sells selected, simply find for =sum( and replace Down Arrow, Ctrl Up Arrow will not work.
with =average(.

Question 3 - Validation across worksheets

Names Question 3

In cell A89, allow the users to enter any one of the names which
appear in range A6:A9 of the worksheet named "Lookup techniques".

Alternatively one can also type the sheet name and range reference in In Excel 2010, one can validate across worksheets normally without
Data > Validation > Custom > List > Source. The format would be as using named ranges.
follows:
='tabname'!range_reference

Please note the single quotes before and after the sheet name.

The data validation list in question 1 can be automatically expanded for any new category/item which gets appended by converting the range to a list (or Table
in Excel 2007). First convert the range to a List/Table and then validate the cell. Thereafter ,when you add any connection in cell A14, it will automatically
appear in the validation drop down in cell A8.

Page 73 of 156
The data validation list in question 1 can be automatically expanded for any new category/item which gets appended by converting the range to a list (or Table
in Excel 2007). First convert the range to a List/Table and then validate the cell. Thereafter ,when you add any connection in cell A14, it will automatically
appear in the validation drop down in cell A8. Validation & subtotals

For highlighting inconsistencies in the secondary validation list, cell B8, use a combination of conditional formatting, COUNTIF() and INDIRECT() functions.

Page 74 of 156
lects
he

Page 75 of 156
Separator 2

Recap

Page 76 of 156
Data Querying

Question 1 - AND conditions


Branches Branches Assets Assets Employees Employees
>8 <14 >1100 <1500 >23 <50

Company Branches Assets Employees Company


Question 1 Branches Assets Employees
Bank A 5 1000 23 and(>8,<14)and(>1100,<15and(>23,<50)
Bank B 12 1200 35 Display all the rows in range A8:D13 which meet the criteria specified in range A5:F6.
Bank C 6 1400 47
Bank E 9 1300 25

Page 77 of 156
Data Querying

Question 2 - AND/OR conditions


Branches Branches Assets Assets Employees Employees
>8 <14 >23 <50
>=1000 <1500

Company Branches Assets Employees Question 2


Bank A 5 1000 23
Display all the rows in range A20:D25 which meet the criteria specified in range
Bank B 12 1200 35 A16:F18.
Bank C 6 1400 47
Bank D 13 1600 59
Bank E 9 1300 25

Question 3 - Two conditions

Name Number Question 3


=d1 1800
Using Advanced Filters, display all the rows in range A32:B35 where two conditions
are met:
Name Number
D1 1800 1. Name is D1; and
2. Number is 1800
Question 4 - Formulas in criteria of Advanced Filters

Method 1
Branches Branches ratio
>8 <14 >50

Company Branches Assets Employees ratio


Bank A 5 1000 23 43.5 Question 4 (Using a spare column) - Method 1
Bank B 12 1200 35 34.3 Display all the rows where the branches are greater than 8, less than
Bank C 6 1400 47 29.8 14 and the ratio of Assets to employees i.e. Assets/Employees is
Bank D 13 1600 59 27.1 greater than 50.
.
Bank E 9 1300 25 52.0
Page 78 of 156
Data Querying

Method 2
Branches Branches
>8 <14

Company Branches Assets Employees Question 4 (Without using a spare column) - Method 2
Bank A 5 1000 23 Display all the rows where the branches are greater than 8, less than
Bank B 12 1200 35 14 and the ratio of Assets to employees i.e. Assets/Employees is
Bank C 6 1400 47 greater than 50.
.

Page 79 of 156
Question 4 (Without using a spare column) - Method 2

Display all the rows where the branches are greater than 8, less than
14 and the ratio of Assets to employees i.e. Assets/EmployeesData
is Querying
greater than 50.
.
Bank D 13 1600 59
Bank E 9 1300 25

Question 5 - Running multiple auto filters in one worksheet

Name
A Question 5
S
Filter range A63:A68 on "A" and range A71:A75 on "F".
D
F
A

Name
F
G
H
F

Question 6 - Transfer selected columns to another range

Branches Branches Assets Assets Employees Employees


>8 <14 >1100 <1500 >23 <50

Company Branches Assets Employees


Bank A 5 1000 23
Question 6
Bank B 12 1200 35
Bank C 6 1400 47 Starting from A90, display all the rows in range A82:D87 which meet the criteria specified in
Bank D 13 1600 59 range A79:F80. The final output should only carry data from 2 columns - Company and
Bank E 9 1300 25 Assets.
.
Company Assets
Page 80 of 156
Data Querying

Bank B 1200
Bank E 1300

Please remember that advanced filters do not auto update. Every time the data changes, you will have to rerun the advanced filter.

Page 81 of 156
Data Querying

ployees
d(>23,<50)
pecified in range A5:F6.

Page 82 of 156
Data Querying

in range

8, less than
yees is

Page 83 of 156
Data Querying

8, less than
yees is

Page 84 of 156
8, less than
yeesData
is Querying

eria specified in
mpany and

Page 85 of 156
Data Querying

Page 86 of 156
Question 1 - Extract unique records Question 2 - Extract mobile nos which called
Mobile duplicate
Emp ID Date Question 1 Number s Question 2
A001 3/12/2009 9811098110 3
Extract unique records to another Extract mobile nos wh
A002 6/15/2009 range (starting from cell A16). A 9811098111 1
A003 2/10/2009 9811098112 2 more than once . In t
unique record is defined as a record
which has atleast one distinct entry. output, the repeated
A006 7/16/2009 9811098110 3 should appear only on
A001 3/13/2009 9811098121 1
A001 3/12/2009 9811098142 1
A002 6/17/2009 9811098110 3
A003 2/11/2009 9811098112 2

For counting unique values with conditions within a Pivot Tab


refer to the following link on my site
Emp ID Date
A001 3/12/2009 http://www.ashishmathur.com/calculate-a-unique-count-with
A002 6/15/2009 a-pivot-table/
A003 2/10/2009
A006 7/16/2009
A001 3/13/2009 To avoid this problem, in the "Copy to"
A002 6/17/2009 box of Advanced filters, always specify a
A003 2/11/2009 range reference rather than a cell
reference. Height of range in the copy to
box should be the upto number of rows
in the original range.

Page 87 of 156
Question 4 - Count unique values

Part I - Without conditions

Name Incomplete
A
S
G
F
A
R
Question 3

Extract the output of Question 1 of the previous sheet to this sheet


(starting from A31) Part II - With one condition
.
Location LOB
GH2 HR
Please remember the push and pull feature of Advanced filters. Using Advanced filters, one can only pull AZ1 HR
filtered data from another worksheet, not push data. Therefore, always start from destination worksheet i.e.
the worksheet where you would like the filtered data to appear. GH2 HR
AZ1 POS
This technique will also work in the following situations: HJ7 Comm
1. When the source data and criteria are on different sheets of the same workbook; GH2 IT
2. When the source data and criteria are on one workbook and filtered data needs to be extracted to a
separate workbook.
Question 4

Determine the unique LOB's per location in range L45:L47.

Page 88 of 156
Duplicates and uniques

nos which called more than once

Question 2

Extract mobile nos which called


more than once . In the final
output, the repeated numbers
should appear only once.

itions within a Pivot Table, you may

ate-a-unique-count-with-conditions-in-

Page 89 of 156
Duplicates and uniques

Complete

Location ConditionLOB
AZ1
GH2
HJ7

cation in range L45:L47.

Page 90 of 156
Separator 3

Recap

Page 91 of 156
Summarising based on conditions

Question 1 - One condition


Name Orders
Ashish 10 Question 1 (a) Question 1 (b) You may refer to the following link
Sumit 12 on my website to count text
In B13 and B14, In range J13:J17, get the values in a range -
Ravi 14 determine the total appropriate values. Data http://www.ashishmathur.com/co
Sumit 16 amount of orders is in range J6:J11. unt-text-values-in-a-range/
Sumit 10 secured by Sumit.

Sum 38
Method 1 Count filled up cells (cells with length more than 0)
Method 2 Count Nos.
Count text
Method Criteria Sum Count Count blanks (formulas which return blanks)
Method 1 >10 42 Count empty cells (cells which are empty)
Method 2 10 42

Question 2 - Array multiplication


Price/unit Quantity
10 101
Question 2
12 102
14 103 Determine the total value in cell B29.
16 104
20 106
22 107

Value #NAME?

Please be advised that arrays in the sumproduct function have to all be of a single orientation i.e. either all by rows or all by columns. For multiplying 2 arrays where
one is by row and another one is by column, refer to Question 6 of the "Miscellaneous" sheet .

Ctrl+Enter is a useful key combination to coerce formulas across the selected cells in a range.

Page 92 of 156
Summarising based on conditions
Ctrl+Enter is a useful key combination to coerce formulas across the selected cells in a range.

Within a SUMPRODUCT() function, * implies AND, + implies OR.

The SUMPRODUCT() function has 2 variants - one with a comma and the other with a *. Generally these can be used interchangeably. However, when the numbers
have to taken from multiple columns (Question 6 below), then only the * will work.

Also, the benefit of SUMPRODUCT() with a comma is that it will multiply arrays of numbers even if there is a text value in the range specified. In other words, it will
ignore text values.

Question 3 - Multiple conditions (Summing)


Date Amount
1/1/2009 100 Question 3
1/14/2009 200
1/20/2009 300 In D55:D57, determine the total amount where the dates in range A48:A52 falls
between the dates mentioned in range B55:C55.
1/25/2009 400
2/2/2009 500

Date Date Amount


Method 1 1/1/2009 1/31/2009
Method 2 1/1/2009 1/31/2009
Method 3 >=01/01/2009<=31/01/200 1000 For Excel 2007 and higher versions only

When dealing with dates in any formula, please always enter the dates in separate cells and then refer to those cells in the formula. Avoid typing dates in the formula
because 31/12/2009 will not be treated as 31 December 2009 but as 31 divided by 12 divided by 2009

Question 4 - Lookup value split across multiple columns

Now please try to solve question 6 of the sheet named "Lookup Techniques"

Page 93 of 156
Summarising based on conditions

Question 5 - Multiple conditions (Counting)


Name Region Orders (Rs. Mn)
Ashish Hyderabad 11
Sumit Delhi 2
Ravi Mumbai 14 Question 5
Sumit Delhi 16 In D77, count the instances where the orders secured by Sumit is greater then
Ravi Mumbai 18 10. Please note that Sumit and 10 are both variables specified in range
Sumit Delhi 20 B77:C77.

Name Orders Count


Method 1 Sumit 10 2

Name Orders Count


Method 2 Sumit >10 For Excel 2007 and higher versions only

Question 6 - Sum/Count based on one condition (where data is in another workbook)


Sum (Rs. Mn) Count occurrence
Name Method 1 Method 2 Method 1 Method 2 Question 6
Ashish 11 11 1 1
In B85:E87 sum and count the values from range A6:C12 of the sheet
Sumit 38 38 3 3 named Sales data (from file Excel session-data.xls) .
Ravi 32 32 2 2

Page 94 of 156
Question 6

In B85:E87 sum and count the values from range A6:C12 of the sheet
named Sales data (from file Excel session-data.xls) .
Summarising based on conditions

Question 7 - SUMPRODUCT (Multiple AND/OR)


Product Calorie Amount
Apples High 12
Carrots High 2
Question 7
Apples High 34
Oranges Medium 45 In cell C102, sum up the amount columns for all cases where the Product is either Apples OR
Celery Low 2 Oranges but the Calories content is high.
Apples High 23
Apples High 67
Oranges High 89
Celery High 2

Apples High #VALUE!


Oranges

Since there are only 2 OR conditions i.e. Apples or Oranges, the SUMPRODUCT formula is manageable. If the number of OR conditions was large i.e. then you may
adopt the following approach - http://www.merawindows.com/Forums/tabid/324/forumid/90/threadid/47684/scope/posts/Default.aspx
In my solution to this problem, you may replace the INDIRECT portion with the range reference.

Question 8 - SUMPRODUCT with non numeric values appearing in the values column

Name Region Orders (Rs. Mn)


Ashish Hyderabad 11 Question 8
Sumit Delhi 2
In cell C120, sum the orders column where conditions in A120:B120 are satisfied. Avoid filtering,
Ravi Mumbai 14 sorting and deleting non numberic values from column C.
Sumit Mumbai 16
Ravi Mumbai 18
Sumit Mumbai NA

Sumit Mumbai
Sumit Mumbai
Page 95 of 156
Summarising based on conditions

Question 9 - SUM multiple columns


Product May June
A 12 23 276
S 23 34 Question 9
A 34 45 1530
In cell C129, sum up the revenues fo
Do not use a spare column .
A 1806
A

In the SUMIF() function, if the sum_range This is one example where the
is more than one column wide, then only sumproduct with a comma will not work.
the first column will be used for summing. One will have to use the * symbol.

Question 10 - Toggle between SUMIF() and SUMPRODUCT()

Name Department Amount


A HR 4234
S HR 23 Question 10
D Ops 423
The formula in cell C149 should be such that the user can enter either the
F HR 4 condition in cell A149 or in A149:B149. In other words, the formula in cell
e Ops 34 A149 should operate like both a SUMPRODUCT() as well as a SUMIF()
R HR 234 function.
A Ops 324
F HR 45

Name Department Amount


A Ops
F HR

Question 11 - Dealing with error values


Page 96 of 156
Summarising based on conditions

Values Values
-1 -1
2 2 Question 11
#VALUE! #VALUE!
In cell B160, sum up the values. Avoid deleting errors or using a spare
4 4 column.
#DIV/0! #DIV/0! In cell C160, count the values. Avoid deleting errors or using a spare column.
Err:504 Err:504
Sum/Count 5 5

To sum visible cells in a filtered range ignoring error values, kindly refer to the following article -
http://www.ashishmathur.com/sum-visible-cells-of-a-filtered-range-ignoring-errors/

To sum numbers from a range of alphanumeric entries, kind refer to the following article -
http://www.ashishmathur.com/sum-a-range-of-alphanumeric-entries-ignoring-errors/

Question 12 - Count non continuous cells

Question 12
Count C139
Count the number of entries from range C139, C142, C143 and C145 which are
C142 greater than 15.
C143
C145

Question 13 - YTD revenue

Part I - With no criteria (With a fixed starting month)


1 2 3 4 5 6 7 8 9
KPI Jan Feb Mar Apr May Jun Jul Aug Sep
Revenue 12 13 14 15 16 17 18 19 20

Page 97 of 156
Summarising based on conditions

Revenue tillAug 124

Part II - With one criteria (With a fixed starting month)

KPI Jan Feb Mar Apr May Jun Jul Aug Sep
Quantity 1.0 1.2 1.4 1.6 1.0 0.6 1.3 1.5 1.2
Revenue 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0
PAT 3.0 3.4 3.0 2.4 3.2 1.3 2.0 2.4 1.5

KPI Till

Part III - With one criteria (With a variable starting month)

KPI Jan Feb Mar Apr May Jun Jul Aug Sep
Quantity 1.0 1.2 1.4 1.6 1.0 0.6 1.3 1.5 1.2
Revenue 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0
PAT 3.0 3.4 3.0 2.4 3.2 1.3 2.0 2.4 1.5

KPI From Till


Revenue Jan Apr 2 2.0 5.0 54.0

Question 14 - Count unique values

Ageing
>1m 0
1m 1
2m 1
<1m 2
<1m 3
<=1m 5
Page 98 of 156
Summarising based on conditions

Question 15 - Count unique values

Refer Question 4 of the sheet named "Duplicates and uniques"

Question 16 - Extract unique records

Refer Question 5 of the sheet named "Duplicates and uniques"

Question 17 - Sum monthly revenue

Page 99 of 156
Summarising based on conditions

Part I - Consistent headings

2005-2006 2006-2007 2007-2008 2008-2009 Total


Y-o-Y Y-o-Y Y-o-Y Y-o-Y
Product Revenue Growth Revenue Growth Revenue Growth Revenue Growth Revenue
A 123 223 81% 323 45% 423 31%
S 234 334 43% 434 30% 534 23%
D 345 445 29% 545 22% 645 18%
F 456 556 22% 656 18% 756 15%

Part II - Inconsistent headings

Revenue
Receivables from
Revenue Sales in from Outlet Noida Total
Product from store A Quantity Shop B Items C Pairs sold store Qty Revenue
A 123 12 223 17 323 22 423 29
S 234 13 334 21 434 26 534 33
D 345 14 445 25 545 30 645 37
F 456 15 556 29 656 34 756 41

Part III - Compute total revenue from individual data points

2005-2006 2006-2007 2007-2008 2008-2009 Total


Average Average Average Average
Product Quantity price Quantity price Quantity price Quantity price Revenue
A 123 1200 223 1250 323 1300 423 1450 1,459,600
S 234 1250 334 1287 434 1356 534 1432 2,075,550
D 345 1399 445 1580 545 1672 645 1700 3,193,495
F 456 1450 556 1400 656 1567 756 1634 3,702,856

Page 100 of 156


Summarising based on conditions

Part IV - Compute achievement % till date

Q2 - Revenue Q3 - Re
Actual Target Q-o-Q
Product July Aug Sep revenue Revenue Variance growth Oct Nov
A 123 1200 223 1546 1496 3% 1300 423
S 234 1250 334 1818 1874 -3% 1356 534
D 345 1399 445 2189 2312 -5% 1672 645
F 456 1450 556 2462 2336 5% 1567 756

Just as one can perform a SUM() and COUNT () operation based on multiple conditions by using the SUMPRODUCT() formula, one can also perform an AVERAGE( )
operation based on multiple conditions by using the SUMPRODUCT() formula in the numerator and denominator.

In Excel 2007, one can use the AVERAGEIF() and AVERAGEIFS() formulas to perform a conditional average based on one/multiple conditions.

To make
The the SUMPRODUCT()
SUMPRODUCT() function
function is work in situations
more powerful where there
than its equivalent are textinvalues
functions appearing
Excel 2007 a.k.a. in the between
SUMIFS() numeric columns,
and COUNTIFS() becausekindly refer to my article
the SUMPRODUCT at the
function can be
following
used address
in AND/OR - http://www.ashishmathur.com/sumproduct-function-to-work-on-a-range-with-interspersed-text-values/
situations ("+" and "*" operators). The SUMIFS( ) and COUNTIFS() functions are designed for working with the AND condition only.

Please remember that the SUMPRODUCT() function does not accept entire rows or columns as ranges such C:C or 2:2 unless you are working in Excel 2007. Also, even
though one can do so in Excel 2007, please avoid this practise. If you think that you would be adding data to an existing range, please convert the range to "List" (Ctrl +
L) or "Table" (Ctrl + T). Ctrl + T is specific to Excel 2007.

To make the SUMPRODUCT() function work on the visible cells of a filtered range, kindly refer to my article at the following address -
http://www.ashishmathur.com/apply-sumproduct-on-visible-cells-of-a-filtered-range/

Page 101 of 156


ased on conditions

Formula
S

1
Y
9

ng 2 arrays where

Page 102 of 156


ased on conditions

hen the numbers

her words, it will

Date
1/1/2009
1/14/2009
lls 1/20/2009
1/25/2009
2/2/2009

tes in the formula

Page 103 of 156


ased on conditions

hen

indirect
sumif
countif
offset
getpivotdata
sumifs
countifs

12 of the sheet

Page 104 of 156


12 of the sheet

ased on conditions

then you may

oid filtering,

Page 105 of 156


ased on conditions

tion 9

C129, sum up the revenues for May and June for Product A.
t use a spare column .

Page 106 of 156


ased on conditions

umn.

10
Oct
21

Page 107 of 156


ased on conditions

Oct
1.1
21.0
1.6

Oct
1.1
21.0
1.6

Page 108 of 156


ased on conditions

Q3 - Revenue

Dec
1450
1432
1700
1634

n AVERAGE( )

Tarticle at the
function can be

el 2007. Also, even


nge to "List" (Ctrl +

Page 109 of 156


Conditions - summary

Analysis of large data sets

Data Extraction/Querying Data Summarisation - SUM(), COUNT(), AVERAGE()

In the existing range To another range With formulas


Without/minimal
formulas

Advanced Filters One


1. Auto Filter (Copy to another location) Pivot tables condition Multiple
2. Custom Filter conditions
3. Advanced Filters
(Filter the list in place)

SUMPRODUCT( SUMIF(), SUMIF()


) COUNTIF() COUNTIF()
SUMPRODUCT(
),
See Note 1 SUMIFS(),
COUNTIFS()

See Note 2
Page 110 of 156
Conditions - summary

See Note 2
Note 1:
- Generally, when one wants to sum/count based on one condition, one uses the SUMIF()/COUNTIF() function. However, in the following two
situations, one would have to use the SUMPRODUCT() function even though there is only one condition:

a. When there are multiple columns to sum up (Question 6 of the previous sheet)
b. When the source workbook is closed (Question 8 of the previous sheet). In other words, the SUMIF()/COUNTIF() functions yield error
values when the source workbook is closed

Note 2:
- Generally, when one wants to sum/count based on multiple conditions, one uses the SUMIFS()/COUNTIFS()/SUMPRODUCT() function.
However, when dealing with dates, one can use the SUMIF()/COUNTIF() function even though there are two criteria
- SUMIFS()/COUNTIFS() are specific to Excel 2007

Page 111 of 156


Separator 4

Recap

Page 112 of 156


Pivots - data in one sheet

Question 1
Date Region Area Agent Product Price Quantity Amount
7/25/2008 DA A Ravi QW 24 24 576
7/28/2008 ER S Mahesh OP 29 25 725
7/29/2008 DA A Pankaj PQ 23 30 690 Before pivoting data,
7/30/2008 ER V Mahesh RT 24 35 840 please always remember
to plug in the blank cells.
7/31/2008 DA F Ravi FD 20 40 800 The procedure to do so
8/1/2008 ER V Pankaj MN 30 45 1350 is:
8/4/2008 DA B Sumit RT 26 51 1326
8/5/2008 ER N FD 26 52 1352 1. Select the column or
Sumit columns;
8/6/2008 DA R Sumit MN 26 53 1378 2. Press Ctrl+G > Special >
8/7/2008 ER Q Sumit DF 26 54 1404 Blanks
8/8/2008 DA B Sumit PQ 26 55 1430 3. Now press =, up arrow
key and Control +Enter
8/11/2008 ER N Sumit RT 26 56 1456
8/12/2008 ER S Ravi FD 26 57 1482
8/13/2008 DA B Pankaj MN 26 58 1508
8/14/2008 ER S Ravi PQ 26 59 1534
8/15/2008 DA F Pankaj RT 26 60 1560
8/18/2008 ER Q Ravi FD 26 61 1586
8/19/2008 DA F Pankaj MN 26 62 1612
8/20/2008 ER S Ravi MN 26 63 1638
8/21/2008 ER V Pankaj PQ 26 64 1664 After plugging the empty
8/22/2008 DA F Ravi RT 26 65 1690 cells with the value in the
8/25/2008 ER S Pankaj FD 26 66 1716 cell above, please
remember to select the
8/26/2008 DA A Ravi MN 26 67 1742 entire column and hard
8/27/2008 ER V Pankaj MN 26 68 1768 paste all the values by
8/28/2008 DA F Ravi PQ 26 69 1794 doing Alt + E + S + V. If
you do not do this and
8/29/2008 ER S Pankaj RT 26 70 1820 sort the range, the result
9/1/2008 ER Q Ravi FD 26 71 1846 will be incorrect.
9/2/2008 DA B Pankaj MN 26 72 1872
9/3/2008 ER S Ravi MN 26 73 1898
9/4/2008 DA R Pankaj PQ 26 74 1924
Page 113 of 156
Pivots - data in one sheet

Question 1
Date Region Area Agent Product Price Quantity Amount
9/5/2008 ER S Ravi RT 26 75 1950
9/8/2008 DA R Pankaj FD 26 76 1976
12/31/1899 ER S Sumit MN 26 77 2002
9/10/2008 ER V Sumit MN 26 78 2028
9/11/2008 DA F Mahesh PQ 26 79 2054
9/12/2008 ER S Mahesh RT 26 80 2080
9/15/2008 DA R Mahesh FD 26 81 2106
9/16/2008 ER V Mahesh MN 26 82 2132
9/17/2008 DA F Mahesh MN 26 83 2158
9/18/2008 ER S Mahesh PQ 26 84 2184
9/19/2008 ER V Mahesh RT 26 85 2210
9/22/2008 DA A Mahesh FD 26 86 2236
9/23/2008 ER N Mahesh MN 26 87 2262
12/31/1899 DA R Mahesh MN 26 88 2288
9/25/2008 ER V Mahesh PQ 26 89 2314
9/26/2008 DA B Mahesh RT 26 90 2340
9/29/2008 ER N Mahesh FD 26 91 2366
9/30/2008 ER N Mahesh MN 26 92 2392
10/1/2008 ER S Sumit DF 26 50 1300

Page 114 of 156


Question 1
Region Status Amount
East Cancel 12
East Cancel 13
Question 1
East Cancel 14
West Cancel 15 In the pivot table below, we would like to k
West Cancel 16 Region. Cancellation rate would be compu
(Existing+Cancel).
West Existing 17
East Existing 18 In other words, i want to insert one row be
West Existing 19 Existing and Grand Total), which gives the c
West Existing 20
West Existing 21
East Existing 22
East Existing 23
North Cancel 24
North Existing 25
South Existing 26
South Existing 27
South Existing 28
South Cancel 29
South Cancel 30
South Cancel 31

Solution 1
Sum - Amount Region
Status East North South West Total Result
Cancel 39 24 90 31 184
Existing 63 25 81 77 246
Total Result 102 49 171 108 430
Pivots - Formulation (Part II)

able below, we would like to know the cancellation rate per


ellation rate would be computed as Cancel/
cel).

ds, i want to insert one row below Existing (i.e. between


Grand Total), which gives the cancellation rate per region.
Count data in columns

Date of
service Service 1 Service 2 Service 3
12/Apr/11 Jones Taylor Taylor
30/Jul/11 Moore Miller Garcia Question 1
18/Apr/11 Thomas Jackson Anderson From the data shown alongside, determine the number of services (by service type and total)
18/Apr/11 Jackson White taken by every individual monthwise.
25/Jan/11 Jackson Harris Thompson
10/Mar/11 Thompson Harris Johnson
13/Mar/11 Smith Lewis
18/Jan/11 Thomas Garcia Williams
6/Jul/11 Garcia Rodriguez Harris
9/Apr/11 Thompson Miller
7/Apr/11 Martin
15/Apr/11 Jones Jones Clark
13/Jul/11 Harris Thomas Garcia
26/Aug/11 Wilson Thomas Martin
1/May/11 Davis Williams
12/Apr/11 Lewis Garcia White
22/Mar/11 Martin Clark Moore
21/Aug/11 Williams Thomas
19/Jul/11 Jones Rodriguez Wilson
27/Jul/11 Jones
6/Mar/11 Clark Thompson

Page 118 of 156


unt data in columns

Page 119 of 156


Group PT's indepe

Date Region Area Agent Product Price Quantity Amount


6/25/2008 DA A Ravi QW 24 24 576
7/28/2008 ER S Mahesh OP 29 25 725
7/29/2010 DA A Pankaj PQ 23 30 690
9/30/2010 ER V Mahesh RT 24 35 840

Question 1

Group the first Pivot Table by Months and the second one by Years (without recreating the second Pivot Table).

Sum - Amount Region


Date DA ER Total Result
6/25/2008 576 576
7/28/2008 725 725
7/29/2010 690 690
9/30/2010 840 840
Total Result 1266 1565 2831

Sum - Amount Area


Date A S V Total Result
6/25/2008 576 576
7/28/2008 725 725
7/29/2010 690 690
9/30/2010 840 840
Total Result 1266 725 840 2831

Page 120 of 156


Group PT's independently

Page 121 of 156


Pivots - summary

Pivot Summary - Part I

Pivot Analysis

Averaging Grouping dates into months/quarters/years

Simple average such Weighted average such as average Seeing the Grouping Get the message
as average quantity price by agent, by area and by region box "Cannot Group the
sold per month or average realisation. selection". Reasons
can be

Calculated field formula


Value Field Settings >
Summarise by >
Average At least one
non date
Blank rows selected in the entry in the
source data of the pivot. date column
of the source
data

Page 122 of 156


Blank rows selected in the
source data of the pivot.
Pivots - summary

Delete all blank rows and blank


columns. To convert non
SUMIF(), COUNTIF() dates to dates,
refer to
question 1 and
2 of the sheet
named
"Dealing with
dates"

Refresh the pivot


more than once

Should see the


Grouping box

Page 123 of 156


Pivots - summary

Pivot Summary - Part II

Formulation in a pivot

Calculated field formula Calculated Item formula

Avoid writing IF functions in a Problem encountered


pivot table. As seen, in the Multiplications in a pivot table when computing ratios
"Commission" for East and lead to incorrect results. - See before Grand Totals - See
West is wrong - See sheet sheet named - "Pivots sheet named "Pivots -
named - "Pivots formulation formulation (Part I)" Formulation (Part III)")
(Part III)"

Solutions

Page 124 of 156


Pivots - summary

Solutions

Compute cancellation
Compute Grand total first ratio first (by using
(by using calculated iten calculated iten formula)
formula) and then and then compute Grand
compute the cancellation Total . Change the solve
ratio. There will be no order to correct for
need to change the solve cancellation rate in the
order Grand Total column

Page 125 of 156


Separator 5

Recap

Page 126 of 156


Question 1 - Two y - axis chart
Name Orders %
A 10 4%
B 23 9%
C 12 5%
D 34 13%
E 14 5%
F 78 30%
G 16 6%
H 76 29%

In the chart above, orders are depicted in column on the primary y axis and % is depicted in line on the secondary y axis. If you wish to show both Orders as well as % as
columns , then please refer to the following link on my website

http://www.ashishmathur.com/create-a-column-column-graph-on-two-axis/

Question 2 - Dates on x-axis

Date Amount
15/Jan/09 12
20/Feb/09 23
25/Feb/09 34

Question 2

Plot only those dates on the x-axis which appear in


the source data. Page 127 of 156
Question 2

Plot only those dates on the x-axis which appear in


the source data.

Page 128 of 156


Question 3 - Data labels overlapping on a pie chart

Name Amount
Asia 1,897
Americas 1,259
Middle East and Nort 103
Central and Eastern 89
Far East (excl. Mala 188

Question 3

Make the data lables on a pie clearly visible withour manually


moving boxes, reducing font size or abbreviating the data
labels.

Question 4 - Accommodating multiple data points on a pie chart (Bar of pie)

Orders
Name of Agent secured
A 100
B 100
C 100
D 10
E 20
F 100
G 230
H 170
I 30
J 100
K 20
L 20
Page 129 of 156
Question 5 - Customising the "Other" data label in a bar of pie chart

LOB Revenue
Power 142.3
Telecom 80.0
Others 44.5
Railways 65.9
Airports 23.0
Ports 12.0
Roads 12.0

Question 5

Change the Other data label on the pie to "Transportation" and ensure
that the graph remains dynamic for changes made to the source data

Page 130 of 156


Question 6 - Changing bar/column colour based on values

Part I - Colour columns, representing negative values, in red

50%
Profit
LOB margin (%) 40%
Power 12% 40%
Telecom -4% 50%
Retail 40% 30%
Hospitality -6% 40%
Car Rental -7% 20%
Manufacturing 2% 12%
30%
10%
2%
20% 40% Column B
0%
Power Telecom Retail Hospitality Car Rental Manufacturing
10% -4%
-10% -6% -7%
12%
0% 2%
Part II - Colour columns, representing values less than a benchmark
-4% value, -6%
in red
1 2 3 4 -7%
5 6
45%
-10% 40%
40%
Revenue
LOB Growth (%) Dummy 35%
Power 12% 12% 30%
Telecom 10% 0%
25%
Retail 40% 40%
Hospitality 6% 0% 20%
Car Rental 7% 0% 15% 12% 12%
Manufacturing 12% 12% 10%
10% 7%
6%
Benchmark 10% 5%
0%
Page 131 of 156
Power Telecom Retail Hospitality Car Rental Manufacturing
25%
20%
15% 12% 12%
10%
10% 7%
6%
5%
0%
Power Telecom Retail Hospitality Car Rental Manufacturing

Page 132 of 156


Question 7 - Doughnut chart

Product FY 2007-08 FY 2008-09


Shoes 12 45
Apparels 34 89
Accessories 56 125
Sports Gear 89 91
Tennis rackets 90 76
Basketballs 49 53

Page 133 of 156


Question 8 - Disproportionately sized column/bar charts

Product Revenue
Product A 123
Product S 1200
Product D 12
Product F 8
Product Y 10

Question 8

In the graph above, also want the columns for Product D, Product F and Product Y to be shown prominently.

Question 9 - Showing data labels on Stacked column charts

90

80

70 Page 134 of 156


23
60
90
Revenue
Revenue from 80
Product from India overseas
70
A 12 34 23
S 24 6 60
D 23 10 20
F 45 20 50
R 54 23
40

30 34 10
6 54
45
20

10 24 23
12
0
A S D F R
Revenue from India Revenue from overseas

Question 10 - Hiding data labels for zero values on Stacked column charts

Product FY2005-2006FY2006-20FY2007-200 FY2008-200FY2009-2010


Shoes 12 13 19 18 21
Apparels 0 0 5 8 18
Accessories 0 0 6 9 21
Sports Equipment 0 4 6 11 14

80

70
14
Question 10
60
In the graph alongside, hide datalabels which show a
50 21 value
of 0.
40 Page 135 of 156
11
6
30 9 18
6
80

70
14
Question 10
60
In the graph alongside, hide datalabels which show a
50 21 value
of 0.
40 11
6
30 9 18
6
20 5 8
4
0
10 0 21
19 18
12 13
0
FY2005-2006 FY2006-2007 FY2007-2008 FY2008-2009 FY2009-2010
Shoes Apparels Accessories Sports Equipment

Question 11 - Plotting multiple series on the X axis

Date Complaints 90
1/1/2010 12
2/1/2010 34 80 89 90
3/1/2010 56 78
4/1/2010 32 70 78
5/1/2010 67 67 68
6/1/2010 2 60
7/1/2010 17 56 56 56
8/1/2010 68
50
9/1/2010 34
10/1/2010 56 45
40
11/1/2010 78
12/1/2010 56 34 34
34 32
30 32
1/1/2011 1
2/1/2011 2 23
20 21
3/1/2011 34 17
16
4/1/2011 45 12
10
5/1/2011 16
6/1/2011 78 2 4
1 2
0
1/1/2010 Page 136 of 156 5/1/2010
3/1/2010 7/1/2010 9/1/2010 11/1/2010
34 32
30 32

20 23
21
17
16
12
10

2 4
1 2
0
7/1/2011 23
1/1/2010 3/1/2010 5/1/2010 7/1/2010 9/1/2010 11/1/2010
8/1/2011 89
9/1/2011 90 Question 11
10/1/2011 21
11/1/2011 32 Display multiple series on the x axis i.e. create a 2 x-axis chart.
12/1/2011 4

Question 12 - Ignore missing data points in line charts

90
Month Price Qty Revenue
Jan 1 9 12 80 78
Feb 2 15 23
70
Mar 2 20 34
Apr 0 60
May 2 6 12 50
Jun 2 23 45 45
Jul 2 52 78 40
34
30
23
20

10 12 12

0 0
Jan Feb Mar Apr May Jun Jul

Question 13 - Plotting values against various bands

Limits Values
Danger-Lower 15
Danger-Upper 25
Ideal range-lower 25
Ideal range-Upper 35
Overstocked-lower 35
Page 137 of 156
Overstocked-Upper 45

Jan Feb Mar Apr May


Danger-Lower 15 15 15 15 15
Understocked 10 10 10 10 10
Ideal range 10 10 10 10 10
Overstocked 10 10 10 10 10
Overstocked-lower 10 35 35 35 35
Overstocked-Upper 10 10 10 10 10
Actual stock 33 37 23 28 26

50
37
45
33
40
28
35
26

30 23

25

20

15

10

0
Jan Feb Mar Apr May
Danger-Lower Understocked Ideal range Page
Overstocked 138 Overstocked-lower
of 156 Overstocked-Upper Actual stock
10

0
Jan Feb Mar Apr May
Danger-Lower Understocked Ideal range Overstocked Overstocked-lower Overstocked-Upper Actual stock

Question 14 - Decluttering stacked charts

Account Contact Inactivatio


Issue Type Training Reactivation Helpzilla
Merges Merges n
Q3'10 119 3 4 2 0 3
Q4'10 104 0 0 5 4 8
Q1'11 123 0 2 1 26 3
Q2'11 80 1 0 0 2 4

180

160

140 26
0
120
4
100

80 2

60 119 123
104
40 80

20

0
Q3'10 Q4'10 Q1'11 Q2'11
Account Merges Contact Merges Training Inactivation Reactivation Helpzilla

Account Contact Inactivatio


Issue Type Training Reactivation Helpzilla
Merges Merges n

Page 139 of 156


Q3'10 119
3 4 2 0 3

Q4'10 104
0 0 5 4 8

Q1'11 123
0 2 1 26 3

Q2'11 80
1 0 0 2 4

140 35

120 3 30

A
c 100 25
c A
o l
u 80 20 l
n
t O
123 26 t
M 60 119 15 h
e 104 8 e
r r
g 40 3 80 10 s
e
s 2
4
20 4 4 5
5 1 2
3 2
0 1 0
Q3'10 Q4'10 Q1'11 Page 140 of 156
Q2'11
Account Merges Contact Merges Training Inactivation Reactivation Helpzilla
r r
g 40 3 80 10 s
e
s 2
4
20 4 4 5
5 1 2
3 2
0 1 0
Q3'10 Q4'10 Q1'11 Q2'11
Account Merges Contact Merges Training Inactivation Reactivation Helpzilla

Steps for creating a clustered stacked chart (Question 14)

Step 1 - Insert one row above and one row below the 4 rows. So if there are four rows (one for earch quarter), eight rows will get created
(two for each quarter) - one above and one below the quarter
Step 2 - In the blank cells which now emanate because of step 1, enter Label1 in column A. So for four rows, eight Label1 text values should a
Step 3 - Copy the data (numbers in columns C:G) from every second row and paste it in the row below. So, copy data from second row and pa
third. Then copy data from the fourth and paste it in the fifth and so on
Step 4 - Delete the data from every second row now i.e. delete data from row 2, row 4 etc.
Step 5 - Enter label1 in the last row of column i.e. two label1 headings will appear together in the end
Step 6 - Select range from the header row to one row below the last row of data
Step 7 - Create a stacked column chart
Step 8 - Right click on the first column and under Format data Series, select Gap width as 0
Step 9 - Right click on any one stack block in the second column and under Format Data Series, select Secondary Axis
Step 10 - Repeat step 9 for every stacked block in the second column
Step 11 - Right click and add date labesl for all columns and stacks per column
Step 12 - In the source data, delete label1 from column A

One can automatically plot data points appended to an existing source range (data added by rows to the source data of a graph) by converting the source range to a
list/Table (in Excel 2007). Please note that in Excel 2007 and higher versions, a range converted to a List /Table (in Excel 2007) expands by columns as well (only for graphs,
not for formulas).

Please visit http://peltiertech.com/Excel/Charts/index.html to learn new and innovative graphing techniques.

Page 141 of 156


Graphs

ers as well as % as

Page 142 of 156


Graphs

12%

Page 143 of 156


Manufacturing
12%

Graphs

Manufacturing

Page 144 of 156


Graphs

Page 145 of 156


23
Graphs

23

54

which show a

Page 146 of 156


which show aGraphs

78

56

32

1/1/2010 Page 147 of 156


32

Graphs
4

1/1/2010

Page 148 of 156


Graphs

s will get created

1 text values should appear


m second row and paste it in the

ce range to a
ell (only for graphs,

Page 149 of 156


Miscellaneous

Question 1 - Sum visible cells Question 2 - Add Hyperlinks/Remove hyperlinks


Name Amount Go to specific cell Sheet 1
Ashish 1 This does not work on columns. Go to specific range criteria
Mathur 2
Praveen 3 To create a hyperlink to a range of cells, use the Naming
Harish 4 It is always advisable to use the 100 series in the feature of Excel
SUBTOTAL() function. It takes care of rows which
Mahesh 5
are concealed either by filtering or by manually
Total hiding.

Question 3 - Count alphanumeric strings and Sum names starting with "A" Question 4 - Monitor cells
Product Class Name Amount Name Summation
1 Ashish 13 Ashish 10
AC Anuj 13 Sanjay 0
B Mahesh 21 It is possible to select multiple non-contiguous cells in Show watch
9 Rakesh 12 window by pressing the Ctrl key
C Akshay 21
Method 1 Akash 89
Method 2 Sum

Question 5 - Dynamic Transposing


Revenue 2009 2010 2011 2012 2013
In cell B27, type the cell reference (cell reference only - without
Company A 100 104 108 112 116
the =) of the cell from where you want to transpose the data
Company B 111 112 113 114 115 and then drag to the right.
Company B

Company A
Paste HLOOKUP() Shorter Though we have discussed a shorter formula here for transposing, please
Company B special formula formula remember that if there are many array formulas in the workbook
2009 111 100 100 (confirmed by Ctrl+Shift+Enter) the workbook recalculations slow down.
Therefore please use array formulas judiciously.
2010 112 104 104
2011 113 108 108
2012 114 112 112
Page 150 of 156
Miscellaneous

2013 115 116 116

Page 151 of 156


Miscellaneous

Question 6 - Multiply arrays with a different orientation (horizontal/vertical) and then sum
Total input
Product Production Input/ProduA B C D required
A 10 In1 1 1
B 11 In2 1
C 12 In3 1 1
D 13 In4 1 1 1 1
In5 1 1

Question 7 - Sum coloured cells Question 8 - Convert Rs. To US$


Name Amount Product Rs. mn
A 10 In Excel 2007, the user can indirectly sum A 231 For this trick to work, kindly ensure that
S 123 coloured cells by filtering based on cell D 235 MS Excel is patched up with the latest
D 30 colours and then using the SUBTOTAL(9,) F 781 update. After doing so, restart Excel and
function. then apply this trick.
A 456 R 891
A 50 E 761
Q 60 W 915
A 70 The trick of Find > Options > Format can be
used only when the cells (or font) have
Y 80 been manually coloured i.e. If the cells (or Exchange ra 45
R 891 font) have been conditionally formatted,
H 100 then this trick will not work.
Y 110
R 780

Question 9 - Show next weekday Question 10 - Spell check across the workbook
Date
12/25/2008 26/12/2008 After performing your task (such as spell check) on grouped sheets, please
remember to ungroup the sheets.
12/26/2008 29/12/2008

Question 11 - File bloat Question 12 - See upto 4 different portions of the worksheet at the same time
Page 152 of 156
Miscellaneous

Question 13 - View different worksheets of the workbook


New Windows > Arrange

Question 14 - Indent/Bullet sub categories

Revenue Revenue
Prod A Prod A The bullets applied by this method will remain even after pasting the cells in MS Word or MS Power
Variant S • Variant S Point.
Variant T • Variant T
Prod B Prod B

Question 15 - Freeze Panes for viewing and printing Question 16 - Open all linked files at once
Save Workspace

Question 17 - Alternative to hiding rows Question 18 - Cond format across sheets

Name Marks
Gautam 60
Question 19 - Apply operation on filtered data Ashish 10
Sameer 20
Product Rs. mn Sanjay 30
A 231
D 235 Colour all numbers where the marks scored by
F 781 a student are greater than the marks scored by
A 891 the same student in range B6:B9 of the sheet
"Lookup techniques".
E 761
W 915

Exchange ra 45

Page 153 of 156


Miscellaneous

A very common problem faced by a majority of the Excel users is that our files take ages to open i.e. when we log into our system in the morning and open an Excel
file, the file takes unduly long to open. The single biggest reason for this occurrence is that the ranges used in formulas include redundant rows i.e. since we know
that we will keep adding data to an existing range, we define the range in a formula as fairly large (such as A5:B20000 when data is actually only populated in range
A5:B1000) to take care of further data additions . Please avoid this practise. Instead just convert the range to a list (or Table in Excel 2007).

As has been discussed in the 2 day session, there are multiple benefits of converting a range to a List (or Table in Excel 2007). However, there are some restrictions
and limitations of converting a range to a List (or Table in Excel 2007):

1. When you want to reorder the columns;


2. When you want to copy multiple worksheets (all together) to either the same workbook or another workbook where one of the multiple worksheets has a list
(or Table in Excel 2007).
3. A List/Table cannot contain multi cell array formulas. Therefore, a data Table (What-If analysis) cannot be converted to a Table/List;
4. Data > Subtotals or Data > Outline > Subtotals (in Excel 2007) will not work on a range which has been converted to a List/Table;
5. Cannot share a workbook which contains a Table/List;

Page 154 of 156


watch

without
data

Page 155 of 156


3

Page 156 of 156

You might also like