Sumifs
Sumifs
Assignment-1
Q.1. Total No of Pets Of People that are under the age 60 and are from New York.
Assignment-2
Q.1. Calculate the total revenue from "Gold" accounts in the state of NY.
Assignment-3
Q.1 If the No. of Members is greater than 4 the add the corresponding points.
Q.2. If the No. of Members are equal to 4 then add the corresponding points.
Q.3. Serch for "GFG_CODERS" and add the corresponding points.
Q.4. Here the sum_range argument is not provided so it will check the cells of C Column & if the points are greater than
Q.5. Here it will find the names of the teams ending with "rs" /"RS" and add the corresponding points to the sum.
Assignment-4
What you want is to find out a sum of amounts relating to a given fruit and supplier, e.g. all apples supplied by Pete.
let's define all the arguments for our SUMIFS formula:
sum_range - C2:C9
criteria_range1 - A2:A9
criteria1 - "apples"
criteria_range2 - B2:B9
criteria2 - "Pete"
Now assemble the above parameters, and you will get the following SUMIFS formula:
Assignment-5
In the formula, the ‘criteria’ parameter uses the ‘*’ to capture all shades of green or blue
The sum range is the ‘Count’ column (B4:B14) and the samples for using the ‘SUMIF’ fun
Assignment-6
Q.1. If we wanted to get the total amount of Sales from Region Code 542 only for employee 1005
Q.2. If we wanted to add together to Total amount of sales from all employees in the West region that sold more than $
Q.3. If we wanted to add together to Total Commission amounts from all employees whose names ended with the letter
Ans.1:-sumifs(E2:E8,D2:D8,542,B2:B8,1005)…..$2000
Ans:2:- sumifs(E2:E8,E2:E8,">4000",C2:C8,"West")….$20000
Ans:-3:- sumifs(G2:G8,A2:A8,"*n",C2:C8,"West")……$19000
Q.1. To get the total sum of legs of Animals with Wool Exteriors
Q.2. To get the total sum of legs of Animals with Wool Exteriors AND 2 Eyes
Q.3. To get the total no. of Eyes for Animals with Exoskeleton Exteriors And more than 6 Legs.
Q.4. To get the sum of Legs for all Animals that starts wit "s".
Q.5. To get the sum og Legs for all Animals that start with "Sh"
Q.6. To get the sum of Legs for all Animals start with "s" AND have more than 3 Eyes
Q.7. To get the total sum of legs for all Animals that have 2 Eyes AND more than 4 Legs.
=SUMIFS(D3:D16,B3:B16,"Spit
Bomb",C3:C16,"*th") to get
sum of spit bombs sold in
North and South.
=SUMIFS(acme[Sales],
acme[Region],"North",acm
e[Product],"<>Pod Gun")
Sales of all products
that contain letter B
=SUMIFS(acme[Sales],
acme[Product], "*B*")
Ans
612
307
330
200
& if the points are greater than 100 add it to the result. 787
using the ‘SUMIF’ function using a hard coded value for ‘criteria’ as well as a cell reference are al
t region that sold more than $4000 worth of products.
05)…..$2000
8,"West")….$20000
"West")……$19000
The ‘range’ parameter is actually the range of cells that will be evaluated by the ‘criteria
the ‘criteria’ parameter is the condition that must be met in the ‘range’ parameter. For i
*One thing to note, however, is that any mathematical expression must be enclosed in dou
The ‘sum_range’ parameter is optional as noted by the brackets. This simply means that
Syntax of SUMIFS..
‘=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …)’
Notice that the primary difference compared to ‘SUMIF’ that is immediately obvious is th
Following this first parameter is the first criteria range and criteria pair, ‘criteria_range
A very useful feature of the SUMIFS function is the ability to use comparison operators lik
e’ parameter. For instance, if our ‘range’ was a column that listed t-shirt color, a value like ‘red’ o
t be enclosed in double quotes as we will see when we cover using comparison operators.
simply means that if omitted, the ‘sum_range’ will default to the same cells you chose for the ‘ran
operators.
lookup_value –[required argument] -Lookup value specifies the value that we want to lookp
table_array – this is the table array in which you are looking for the value.
This could be a reference to a range of cells or a named range. In the score
sheet example, this would be the entire table that contains score for
everyone for every subject
col_index – this is the column index number from which you want to fetch
the matching value. In the score sheet example, if you want the scores for
Math (which is the first column in a table that contains the scores), you’d
look in column 1. If you want the scores for Physics, you’d look in column 2.
1. When Range_ lookup is omitted ,the Vlookup Function will allow a non exact match,but it will us
2. The biggest limitation of the function is that it always looks right ,It wil get data from the colum
3. If the lookup column contains duplicate values ,VLOOKUP will match the first value only.
4. The Function is not case -sensetive.
5. VLOOKUP allows the use of wildcards , e.g. an asterisk(*) or a question mark (?).
6. #N/A ! Error -occurs if the Vlookup function fails to find a match to the supplied lookup value.
7. #REF! error-Occurs if either
The col_index_num argumnet less than 1 or is not recognizes as a numeric value;or
The range_lookup argument is not recognized as on e of the logical values TRUE or FALSE
Assignment-1
Subject
Name Math Physics Chemistry Biology
Matt 38 58 66 49
Bob 88 92 74 90
Tom 57 77 91 91
Brad 82 56 45 95
Jenny 55 55 65 75
Maria 44 69 80 90
Jill 75 51 57 84
Josh 38 37 51 56
Assignment-2
In Excel drop down list is a data validation function that allows users to select an opti
VLOOKUP(D2,A2:C10,3,FALSE)
ol_index_num, [range_lookup])
the score
nt to fetch
column 2.
function should
kup_value.
n mark (?).
he supplied lookup value.
a numeric value;or
cal values TRUE or FALSE.
Ans-1 Ans-2
82 80
Bob
88
rs to select an optiEmp-8
Emp-9 7
DATE
42342
Ans-2
1020
Ans-1
5555
nt is found, you go to the right in that row and fetch a value from a cell which is a specified numbe
a specified number of columns to the right.
What is HLOOKUP?
The Excel HLOOKUP function is designed for horizontal lookup. More specifically
it searches for a certain value in the first row of the table and returns another value in the
Same column from a row that you specify.
Syntax
HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
Table_array (required) - two or more rows of data in which the lookup value is searched. I
can be a regular range, named range or table. Lookup values should always be located in
the first row of table_array.
Row_index_num (required) - the row number in table_array from which the value should
be returned. For example, to return the matching value from the 2nd row, set row_index_nu
Range_lookup (optional) - a logical (Boolean) value that instructs HLOOKUP to search with
Q.2. To Find the Marks in English of a student who has got 75 marks in Science.
Q.3. To Find the Maths Marks of a Student Name starts with 'G'.
Assignment-2
Master Data
Emp ID Emp125 Emp128 Emp127 Emp120
Emp Name Abhi Raju Abhi Jyothi
Salary 68289 50047 64323 45788
From the above table ,you need to get the below employees salary details
Q.2.
Q.1.To get the value in the 3rd row where the value in the first row is "Clinton".
Q.4. Write an Hlookup Formula that returns the No.of Years Trump was in Office
Q.5. Write an Hlookup Formula that returns the no of Years Clinton was in office.
Example 1
In Table 1 We have a list of our Products, In Table 2 ,We need to find their row number.
Table 1
Table 2
Table 2 Solution
Example 2
Table 2: From the above table, find out the below details.
If you look at the table, all the orders in the rows are changed. By using the Match
Function We can get the Row-Index Number.
The result will be like the below one.
What is the difference between Hlookup & Vlookup?
As you already know, both functions VLOOKUP and HLOOKUP search for a lookup value. Th
difference is how the search is performed. As you probably noticed, the functions' names
differ only in the first letter - "H" stands for horizontal, and "V" for vertical.
Hence, you use the VLOOKUP function to search is vertical lists when your lookup values
are located in a column to the left of the data that you want to find.
The HLOOKUP function performs a horizontal lookup - it searches for a lookup value at th
top-most row of the table and returns a value located a specified number of rows down in
the same column.
The following image demonstrates the difference between Vlookup and Hlookup formulas i
More specifically
ns another value in the
Emp156
Kavya
25910
Emp156
Kavya
25910
Ans-6 An-6
8 1988
DATE FUNCTION IN EXCEL
The Excel DATE function creates a valid date from individual year, month, and day compon
The DATE function is useful for assembling dates that need to change dynamically based o
The DATE function creates a date using individual year, month, and day
argumen Each argument is provided as a number, and the result is a serial
number that represents a valid Excel date. Apply a date number format to
display the output from the DATE function as a date.
In general, the DATE function is the safest way to create a date in an Excel formula, becau
and day values are numeric and unambiguous, in contrast to text representations of dates
Calculate workdays:
WORKDAY:-returns a date N working days in the future or in the past
WORKDAY.INTL:-returns a date N weekdays from the start date with custom weekends
NETWORKDAYS:-returns the number of workdays between two dates
NETWORKDAYS.INTL:-returns the number of workdays between two dates with custom weekends
=DATE(YEAR(TODAY()), MONTH(TODAY()), 1) - returns the first day of the current year and month.
Notes:-
The DATE function returns a serial number that corresponds to an Excel date.
Excel dates begin in the year 1900. If year is between zero and 1900, Excel will add 1900
The Date Function accepts numeric Input only and will return #VALUE if given text
month, and day components.
ge dynamically based on other values in a worksheet.
custom weekends
rrent year and month.
an Excel date.
Just subtract the dates or use the DAYS function available in Excel 2013 or later.
a. The NETWORKDAYS function returns the whole number of workdays between two date
You can exclude the holidays from the calculation.
Holidays (Optional argument): Is a list of holidays to exclude from the calculation of workin
if omitted it will assume that there are no holidays within the date range evaluated.
b. If you want to exclude a custom weekend, for example, only Sundays, you can use the
NETWORKDAYS.INTL function available in Excel 2010 or later.
weekend (Optional argument): Is a number that indicates which days should be considered as
weekend days. For example, 2 = Weekend days are Sunday and Monday; 11 = Weekend d
are only Sundays.
c. You can also exclude a custom weekend that is not included in the NETWORKDAYS.IN
options. To do this you can type a seven character string formed by ones (1) for days to inc
in the weekend and zeros (0) for days to exclude from the weekend. For example to exclud
Mondays, Wednesdays, and Fridays you can type “1010100” in the weekend argument.
To add a number of working days to a date you can use WORKDAY or WORKDAY.INTL
functions have a syntax very similar to NETWORKDAYS and NETWORKDAYS.INTL
To add or subtract a number of months to a given date you can use the EDATE
To determine the first day of a month you can use the function EOMONTH.
You just need to calculate the last day of the previous month and add 1 day to that date.
In general, if you want to determine the nth day of a month, just add n to the last day of the previous m
Remember that the EDATE function adds (or subtract) a number of months to a specified date (start_d
Therefore, if you need to add n years to a date, you just add 12*n (12 months in a year) to the star
z
To calculate the years that have passed between two dates we will use the
YEARFRAC calculates the fraction of a year represented by the number of whole days betw
Sometimes dates are introduced in Excel formatted as text and when you try to use a date
function you get an error. To convert a date-like text to a serial number that Excel recogniz
date we can use the DATEVALUE function.
The DATEVALUE function converts a date that is stored as text to a serial number that Exce
DATEVALUE will recognize the most common text strings used to symbolize dates, for exam
If DATEVALUE returns “#VALUE!” error value if the value of the date_text argument falls ou
of the range between January 1, 1900 and December 31, 9999 or Excel cannot identify the
format used. For example:
Excel recognizes the format mm/dd/yy but it doesn’t recognize the format mm.dd.yy.
Therefore, we need to substitute the “.” by “/” to make the DATEVALUE function work.
Text is the text or the reference to a cell containing text for which you want to substitute c
nstance_num (Optional) – Specifies which occurrence of old_text you want to replace with
new_text. If you specify instance_num, only that instance of old_text is replaced
Otherwise, every occurrence of old_text in text is changed to new_text.
Examples: Get the first (1st) Monday of a month or the second (2nd)
Wednesday of a month
For the weekend number use 1 for Sunday, 2 for Monday, …, 7 for Saturday
tions
el 2013 or later.
holidays])
end], [holidays])
uld be considered as
Monday; 11 = Weekend days
the NETWORKDAYS.INTL
by ones (1) for days to include
nd. For example to exclude
e weekend argument.
AY or WORKDAY.INTL. These
TWORKDAYS.INTL.
[holidays])
se the EDATE function.
e, basis)
nstance_num])
nt to replace with
ext is replaced
The consolidate function in Excel allows an analyst to combine information from multiple
workbooks into one place. The Excel consolidate function lets you select data from its
various locations and creates a table to summarize the information for you.
To summarize and report results from separate worksheets, you can consolidate data from
each sheet into a master worksheet. The sheets can be in the same workbook as the mast
worksheet, or in other workbooks. When you consolidate data, you assemble data so that y
can more easily update and aggregate as necessary.
Data Consolidation allows you to gather together your data from separate
worksheets into a master worksheet. In other words, the Data
Consolidation function takes data from a series of worksheets or
workbooks and summaries it into a single worksheet that you can update easily.
There are many reasons a financial analyst may want to use the Excel consolidate
function. One example would be combining budgets from various departments into one
company-wide budget. This may be common for an analyst or manager working in
financial planning and analysis (FP&A) or other accounting functions
Function - Allows you to select the type of consolidate function you want to use:
Reference - Specifies the range of cells you select as a source area to consolidate with oth
All references - Lists the source area references selected for the consolidation.
Top row - This only used when you are consolidating by category.
Left column - This is only used when you are consolidating by category.
Create links to source data - This allows you to import all the detailed data of the sourc
but a generated outline will hide them. Without a link Excel will consolidate only the final v
Types of Cosolidaton
There are several different ways you can consolidate your data:
1) Consolidate by Position - When the source data in the worksheets is in the same orde
2) Consolidate by Category - When worksheets have the same row and column labels b
3) Consolidate by Formula - When there is no consistent layout, column labels or catego
In our example, we have data for 3 years expenditure on tea, coffee and
milk. The data is broken down into quarters and stored in one year per
worksheet in one workbook. We can create a ‘Consolidated Summary’
sheet which will show expenditure by year and quarter. It does not matter
if the data has the same arrangement of columns and rows or not.
Year 1 Worksheet
Year 2 Worksheet
Year 3 Worksheet
As you can see, Years 1, 2 and 3 each have different arrangements of
columns and rows. There is no tea in Year 2; in Year 3 the first quarter
appears at the end of the table, there is no Quarter 2 and the Quarters are
not in order. The ranges you consolidate do not have to be of the same size
in each worksheet, the number of rows or columns might be different from
sheet to sheet. And yet, you can still consolidate the data into a summary sheet.
Consolidation steps:
To start using the Data Consolidation tool, you need to select an empty
sheet in the workbook as your master worksheet or add a new one if
necessary. The worksheet is renamed ‘Consolidated Summary’.
Select the upper-left cell of the area where you want the consolidated data to appear.
On the Ribbon, Choose Data > Consolidate to view the Consolidate dialog:
In the Function box, click the summary function that you want Excel to use
to consolidate the data. As you will see from the drop-down, there are 11
functions to choose from. For our data we want to add up the values so
we’ll set the Function to Sum.
Click in the Reference area and select the first data range to consolidate –
to do this you will need to click the Sheet tab i.e. “Year 1” and then drag
over the data (including row and column headings) and then click the Add
button to add this first set of data to the consolidation dialog.
Continue in the same way by clicking on the next sheet, highlighting the
data, and clicking on the Add button until all your data and worksheets
appear in the References section of the dialog e.g. “Year 2” and “Year 3”.
Top Tip: You can name your ranges before you start the Consolidation
process. If you name each range then, when you create the consolidation,
place your cursor in the Reference field, press F3 and then choose the
range from the list in the Paste Name dialog.
To indicate where the labels are located in the source ranges, select the
check boxes under Use labels in: either the Top row, the Left column, or
both. In this example, Top row is the name of the quarters, i.e. Quarter 1,
Quarter 2, etc. and the Left Column are the list of items, i.e. Coffee, Tea and Milk.
You’ll immediately notice a change to the Excel worksheet that you may
never have seen before. You will see grouping tools down the left of the
screen which you can use to display and hide the data. Next to rows 7, 10
and 14, there are plus signs. This signifies that cells are part of a group that
is currently collapsed. Clicking on the plus sign will expand the group and
there is a line connecting these rows to the left:
You’ll find that the second column (Column C) of data shows the name of
the workbook (Core Excel Level 2) that contains the data. You can hide this
column if you want to, by right clicking it and choosing Hide. This simply
hides the column so the data is there should you need to refer to it later on.
If you wish to show the location of the source data on the summary sheet,
I strongly advise you to separate all worksheets to individual workbooks
before you apply the data consolidation. Let’s look at how to do this.
Click OK. A new workbook is created and the worksheet is copied into it.
If you chose to move the worksheet, it will no longer be in the original
workbook. Save the current workbook by the name of the worksheet that
you copied to i.e. “Year 1.xls”.
Continue creating new workbooks for each year e.g. “Year 2” and “Year 3”
to “Year 2.xls” and “Year 3.xls” respectively.
Make sure all the individual workbooks you wish to consolidate are currently open.
Open a new, blank workbook as your master worksheet or add a new one
if necessary. The worksheet is renamed as “Consolidate Summary” and
save this workbook with a name e.g. Summary.xls.
Select the upper-left cell of the area where you want the consolidated data to appear.
On the Ribbon, Choose Data > Consolidate to view the Consolidate dialog
We now simply proceed as we did in the first example, the only difference
being we are selecting data ranges from different workbooks instead of
different worksheets.
When you click OK, Excel summarises all the data into your new master
worksheet (Consolidated Summary).
Here you will see the same data as in the first example, except displayed in
a much more helpful way – Column C now shows the name of the
workbook that contains the data.
mation from multiple
elect data from its
pdate easily.
cel consolidate
epartments into one
ager working in
cell range.
to consolidate with other source areas listed in the All references box.
onsolidation.
ed data to appear.
te dialog:
Tea and Milk.
urrently open.
ed data to appear.
Excel INDEX Function
The INDEX function in Excel is used to return the value of a specified cell, an arr
or to return a reference to specific cells. The INDEX function takes a range of cel
position, and returns the value of the cell at the specified position. The INDEX fu
be paired with the MATCH function for a lookup that is more flexible and powerfu
The INDEX function in Excel has four arguments (values in the function separated by commas) and
The Array form of the INDEX Function in Excel only allows for one array (range) to be re
INDEX(range,row_number,[Column_number])
Assign-1
The INDEX Function in Reference form allows for multiple array to be referenced
INDEX(reference,row_number,[column_number],[area_number])
Like the Array form of the INDEX function, the column_number argument is OPTIONAL.
The area_number is only OPTIONAL if one array is referenced.
If two or more arrays are referenced, then the area_number is REQUIRED.
Assign-2
Array #1 Array #2
Drink Caffeine (mg) Drink Sugar (g)
monster 140 monster 27
Rockstar 160 Rockstar 29.4
Bang 300 Bang 0
for example, if you wanted to find the sugar content of Bang,you can reference the third ro
column(disregarding the header row) of the second array ,one would use the following fun
0
Assign-2
Name Age
Mike 26
Bill 28
Jeff 24
Instead of entering the row and column numbers in the formula, you can supply the cell
references to get a more universal formula: =INDEX($B$2:$D$6, G2, G1)
So, this INDEX formula returns the number of items exactly at the intersection of the product
number specified in G2 (row_num) and week number entered in cell G1 (column_num).
Tip. The use of absolute references ($B$2:$D$6) instead of relative references (B2:D6) in
the array argument makes it easier to copy the formula to other cells. Alternatively, you
can convert a range to a table (Ctrl + T) and refer to it by the table name.
1. If the array argument consists of only one row or column, you may or may not specify th
corresponding row_num or column_num argument.
2. If the array argument includes more than one row and row_num is omitted or set to 0,
the INDEX function returns an array of the entire column. Similarly, if array includes more
than one column and the column_num argument is omitted or set to 0, the INDEX
formula returns the entire row. Here's a formula example that demonstrates this behavior.
3. The row_num and column_num arguments must refer to a cell within array; otherwise,
the INDEX formula will return the #REF! error.
The reference form of the Excel INDEX function returns the cell reference at the intersection
of the specified row and column.
f you are entering more than one range, separate the ranges by commas and enclose the
reference argument in parentheses, for example (A1:B5, D1:F5).
If each range in reference contains only one row or column, the corresponding row_num
or column_num argument is optional.
row_num - the row number in the range from which to return a cell reference, it's similar
to the array form.
column_num - the column number from which to return a cell reference, also works
similarly to the array form.
area_num - an optional parameter that specifies which range from the reference
argument to use. If omitted, the INDEX formula will return the result for the first range
listed in reference.
For example, the formula =INDEX((A2:D3, A5:D7), 3, 4, 2) returns the value of cell
D7, which is at the intersection of the 3rd row and 4th column in the second area (A5:D7).
2. If both row_num and column_num are omitted, the INDEX function returns the area
specified in the area_num argument.
3. All of the _num arguments (row_num, column_num and area_num) must refer to a cell
within reference; otherwise, the INDEX formula will return the #REF! error.
Both of the INDEX formulas we've discussed so far are very simple and only illustrate the
concept. Your real formulas are likely to be far more complex than that, so let's explore a few
most efficient uses of INDEX in Excel.
Source Data
All of our INDEX formulas (except for the last one), we will use the below data
For convenience purposes, it is organized in a table named SourceData.
The use of tables or named ranges can make formulas a bit longer, but it also makes them
significantly more flexible and better readable. To adjust any INDEX formula for your
worksheets, you need only to modify a single name, and this fully makes up for a longer
formula length.
In this case, you simply replace the table name SourceData with the appropriate range reference.
This is the basic use of the INDEX function and a simplest formula to make. To fetch a certain
item from the list, you just write =INDEX(range, n) where range is a range of cells or a
named range, and n is the position of the item you want to get.
When working with Excel tables, you can select the column using the mouse and Excel will
pull the column's name along with the table's name in the formula:
To get a value of the cell at the intersection of a given row and column, you use the same
approach with the only difference that you specify both - the row number and the column
number. In fact, you already saw such a formula in action when we discussed INDEX array form.
And here's one more example. In our sample table, to find the 2 nd biggest planet in the Solar
system, you sort the table by the Diameter column, and use the following INDEX formula:
INDEX(SourceData,2,3)
If you want to return the planet's name rather than diameter, change column_num to 1.
And naturally, you can use a cell reference in the row_num and/or column_num arguments to
make your formula more versatile, as demonstrated in the screenshot below:
Apart from retrieving a single cell, the INDEX function is able to return an array of values
from the entire row or column. To get all values from a certain column, you have to omit
the row_num argument or set it to 0. Likewise, to get the entire row, you pass empty value or
0 in column_num.
a specified cell, an array of cells,
n takes a range of cells and a
position. The INDEX function may also
e flexible and powerful than a simple VLOOKUP.
e area number is the certain range or array reference that is being indexed. This
e ranges or arrays.
Ans-1
38
argument is OPTIONAL.
EQUIRED.
Sugar (g)
nces (B2:D6) in
rnatively, you
ay; otherwise,
at the intersection
mula returns the
ns the area
refer to a cell
y illustrate the
let's explore a few
e reference.
u use the same
and the column
ed INDEX array form.
array of values
you have to omit
ass empty value or
Excel MATCH Function
The MATCH function in Excel searches for a specified value in a range of cells, and returns the
relative position of that value.
Lookup_value (required) - the value you want to find. It can be a numeric, text or logical
value as well as a cell reference.
Match_type (optional) - defines the match type. It can be one of these values: 1, 0, -1. The
match_type argument set to 0 returns only the exact match, while the other two types allow
for approximate match.
1 or omitted (default) - find the largest value in the lookup array that is less than or equa
to the lookup value. Requires sorting the lookup array in ascending order, from smallest to
largest or from A to Z.
0 - find the first value in the array that is exactly equal to the lookup value. No sorting is
required.
-1 - find the smallest value in the array that is greater than or equal to the lookup value.
The lookup array should be sorted in descending order, from largest to smallest or from Z
to A.
1.The MATCH function returns the relative position of the lookup value in the array, not
the value itself.
3. If the lookup array contains several occurrences of the lookup value, the position of the
first value is returned.
4. f the lookup value is not found in the lookup array, the #N/A error is returned.
Example-1
Partial match with wildcards
Like many other functions, MATCH understands the following wildcard characters:
Note. Wildcards can only be used in Match formulas with match_type set to 0.
To replace just one character in the lookup value, use the "?" wildcard operator, like this:
MATCH("ba?er", A2:A11,0)
The above formula will match the name "Baker" and rerun its relative position, which is 5.
And then, the MATCH function compares TRUE (which is its lookup_value ) with each value
in the array returned by EXACT, and returns the position of the first match.
Please bear in mind that it's an array formula that requires pressing Ctrl + Shift + Enter to
be completed correctly.
Assuming your lookup value is in cell E1 and the lookup array is A2:A9, the formula is as follows:
MATCH(TRUE, EXACT(A2:A9,E1),0)
The Excel MATCH function deals with a relative position of a lookup value, which makes it a
perfect fit for the col_index_num argument of VLOOKUP. In other words, instead of specifying
the return column as a static number, you use MATCH to get the current position of that column.
to make things easier to understand, let's use the table with students' exam scores again
(similar to the one we used at the beginning of this tutorial), but this time we will be
retrieving the real score and not its relative position.
Assuming the lookup value is in cell F1, the table array is $A$1:$C$2 (it's a good practice to
lock it using absolute cell references if you plan to copy the formula to other cells), the
formula goes as follows:
The 3rd argument (col_index_num) is set to 3 because the Math Score that we want to pull is
the 3rd column in the table. As you can see in the screenshot below, this regular Vlookup
formula works well:
But only until you insert or delete a column(s):
And now, include this Match function in the col_index_num argument of your Vlookup formula, like this:
And make sure it works impeccably no matter how many columns you add or delete:
In a similar manner, you can use the Excel MATCH function to improve your HLOOKUP
formulas. The general principle is essentially the same as in case of Vlookup: you use the
Match function to get the relative position of the return column, and supply that number to
the row_index_num argument of your Hlookup formula.
Supposing the lookup value is in cell B5, table array is B1:H3, the name of the return row
(lookup value for MATCH) is in cell A6 and row headers are A1:A3, the complete formula is as follows:
s: 1, 0, -1. The
wo types allow
p value. No sorting is
array, not
osition of the
e character case.
up array. If
th each value
rmula, like this:
a is as follows:
Pivot Table & Pivot Chart in Excel
A Pivot table is a table of stats which summarizes the data as sums, averages, and
many other statistical measures
SUM:-
we should perform the sum of the final product value in order to extract
the value of different blocks got as below:
Drag the Block Name to Rows and Final Product value to Values Fields.
This is showing that we have got Cheeku block with 293 Million, Donald block with 212
Million, Mickey block with 324 Million, Rainbow block with 466 Million, and Strawberry
with 355 Million. This table shows us that the Rainbow block got a higher value among
the other blocks.
COUNT:
Let us count the number of flats for different blocks by changing the value field
ettings in Excel Pivot Table to count as below:
AVERAGE:
In Pivot Table Practice Exercise Example, we will find out the average price of the flat in
each block by changing the value field settings from count to average.
Then a Pivot table changes from Count to Average as given below:
From the above Pivot table example, we can see that we got the average flat price in
each block, and Donald block got the highest average price of flat among other blocks.
Similarly, we can perform other statistical measures like Max, Min, Product, Stan
deviation, etc. by changing the value field settings in this example of the P
We can actually change the layout of the Excel Pivot table as per our requirement by
dragging the fields into areas that we want to place it.
In this example of a pivot table in excel, Let’s see how it actually works:
In order to check the total price of maintenance of each block, we just need to drag the
maintenance field into the Value area, and you will get your table modified as below:
Now, this Pivot table shows both maintenance deposit and an average price for
different blocks, and we can change the statistical measure by changing the value field
setting, as discussed earlier.
We can also modify the above table further by adding the type of units that are
available as per block-wise as below:
The above table shows that the type of flats in Cheeku block are A1, A2a, B1, B2a, C1a,
C1b, D1c, D2b, D3b, D4a, D4b, D4c. Similarly, we get for other blocks too.
We can also create a group in Excel pivot tables in order to differentiate a few fields.
In our Pivot Table practice exercise example, let’s create Strawberry block & Cheeku
block as Group-1 and Donald block, Mickey block & Rainbow block as Group-2. Let’s
see how we can create these groups:
As per our above pivot table example, select Cheeku and Strawberry with the help of
Ctrl. Then give a right-click on your mouse to get the list. Go to the group option and
then click on it.
Now we can see the Group has been created as below.
Similarly, we can select the rest of the block and do the same process and click on the
group again. Now, Group-2 will also be created as follows:
We can also name the group by editing the group and giving the names as per our
requirement.
Creating multi-levels in Pivot Table is pretty easy by just dragging the fields to any
specific area in a pivot table.
But here in the example of the pivot table, we understand how we can also make
great insight into this multi-level pivot table.
First of all, we need to drag the block name into ROWS as we are finding out some
insight on the block of the project. Then drag your final product value to the VALUE
area as we get the sum of all flats units value of a particular block in the table.
In order to create a multi-level table, drag the final product value again to the VALUE area.
We can see the table with two columns with Final Product value for differ
below:
Now let’s find out some insight from this data. To do so, we should change the value
field set to any of the measures that need to look at. Here will take a percentage to see
the contribution of different blocks in terms of product value as below:
Go to value field settings then, select “Show Values as” in that select “% of Column Total.”
We can see the Table with a percentage in Final Product Value2 as below.
From the above data, we can understand that Cheeku block had contributed 17.76%,
Donald – 12.88%, Micky – 19.63%, Rainbow – 28.23%, Strawberry – 21.51% of the total
value of the project. A rainbow block is the highest contributor among all other blocks.
Similarly, we can perform different multi-level operations using a pivot table, which
provides great insight from the data.
Pivot Table Example-5
[Creating Frequency in Excel Pivot Table]
Earlier in the example of the pivot table, we had seen grouping the name of the blocks
and now let us group the value in order to create a frequency that shows us the
number of units that fall under a certain area category.
First, drag the area field into ROW and again drag the same area field into the VALUE
area. By default, the VALUE area gives the sum of the area, so we should change it to
count because here, our goal is to find a number of units in a particular area category.
Now right-click on any cell of the row labels and the select group.
Then the grouping window will pop out where we have to give the startin
the frequency to get started and the ending number to end it. In addition
have to give a number which will create a frequency.
Let’s provide the conditions as a starting point as 1000 and ending at 3400
It should split by 400.
Now we can see that the area category has been formed. There are 19 fl
an area between 1000-1400 sqft, 5 flats with an area between 1400-180
with an area between 2200-2600 sqft, 2 flats with an area between 2600
12 flats with an area between 3000-3400 sqft. Here we can assume that
highest number of flats with 3 BHK configuration as per our area.
with 212
count. Here we
Product, Standard
example of the Pivot table.
equirement by
few fields.
and click on the
s as per our
fields to any
also make
g out some
o the VALUE
% of Column Total.”
buted 17.76%,
51% of the total
all other blocks.
table, which
me of the blocks
ws us the
ct group.
o give the starting number for
nd it. In addition to this, we
. There are 19 flats which got
tween 1400-1800 sqft, 41 flats
a between 2600-3000 sqft &
an assume that we got the
our area.
Pivot Chart in Excel
Pivot Chart in excel is an in-built Programme tool in excel which helps you out to
summarize selected rows and column of data in a spreadsheet. It’s the visual
representation of a pivot table or any tabular data which helps to summarize &
analyze the datasets, patterns, and trends. In Simple words pivot chart in Excel is an
interactive excel chart that summarizes large amounts of data.
3.Then select the PivotChart drop-down button within the Charts group. If you
want to create a PivotChart only, then select PivotChart from the drop-down
or if you want to create both a PivotChart and PivotTable, then select
PivotChart PivotTable from the drop-down.
4. Here, I have selected, create both a PivotChart and PivotTable. Create
PivotChart dialog box appears, which is similar to the Create Pivot Table
dialog box. It will ask for the options, i.e., from a table range or from an
external database. By default, it selects table range, and it will ask you where
to place a pivot table chart, here you need to always select in a new
worksheet.
5.Once you click OK ,It Inserts both PivotChart PivotTable in a new worksheet.
6.PivotChart Fields task pane appears on the left side, which contains various
fields, i.e., Filters, Axis (Categories), Legend (Series), and Values. In the
PivotTable Fields pane, select the Column fields applicable to the pivot table;
you can drag and drop, i.e., salesperson to the Rows section, Region to the
Columns section, and sales to the Values section.
Then the chart looks like as given below.
7.You can name this sheet as SALES_BY_REGION, click inside the PivotTable
you can change the chart type, in Change Chart Type option, based on your
choice under Analyze tab in the home, select PivotChart, insert chart popup
window appears, in that Select Bar, under that select Clustered Bar chart.
Right, Click on the Pivot Chart, select Change Chart Type.
Under Change chart type, select Column, then Select the Cluster
9. Now, you can summarize the data with the help of interactive controls
present across the chart. When you click on Region Filter Control, a search
box appears with the list of all the regions, where you can check or uncheck
boxes based on your choice.
10.On the corner of the chart, you have an option to format chart elements
based on your choice.
11. You have an option to Customize the Pivot Table Values; by default, Excel
uses the SUM function to calculate the values available in the table. Suppose
if you select only region values in the chart, it will display the total SUM of
Sales for each region.
12. You have an option to change Chart Style in excel by the click of the Styles
icon on the corner of the chart.
13. This Chart will get updated when you change any dataset values in a pivot
table. This option can be optimized by the following steps: Right-click and
select PivotChart Option.
In the above chart options, go to the Data tab and click on the checkbox Refresh
data when opening a file. So that refresh data gets activated.
Things to Remember…..
In an excel pivot chart, you have an option to insert a timeline to Filter Dates (monthly,
quarterly, or yearly) in a Chart to summarize sales data (This step is applicable only
when your dataset contains only date values).
You can also use a Slicer with a Pivot Chart to Filter region wise data or other
field data of your choice to summarize sales data.
A pivot chart is a Key Metrics tool for monitoring company Sales, finance,
productivity, and other criteria’s
With the help of a Pivot chart, you can identify negative trends & correct it
immediately.
One of the drawbacks of a pivot table is, this chart is directly linked to the
datasets associated with the Pivot Table, which makes it less flexible; because of
this, data outside the Pivot Table cannot be added.
s you out to
in Excel is an
ect the Clustered Column Chart.
x Refresh
r Dates (monthly,
plicable only
because of
Excel MID Function
The MID function extracts a given number of characters from the middle
supplied text string. MID takes three arguments, all of which are
required. The first argument, text, is the text string to start with. The second
argument, start_num, is the position of the first character to extract. The
third argument, num_chars, is the number of characters to extract. If
num_chars is greater than the number of characters available, MID returns al
remaining characters.
Purpose
Extract text from inside a string
Return value
The characters extracted.
Syntax
MID (text, start_num, num_chars)
Arguments
text-The text to extract from
start_num - The location of the first character to extract.
num_chars - The number of characters to extract
The Excel MID function extracts a given number of characters from the
middle of a supplied text string. For example, =MID("apple",2,3) returns "ppl".
m the middle of a
extract. The
xtract. If
e, MID returns all