0% found this document useful (0 votes)
8 views

Excel Functions 1

The document outlines various Excel functions categorized into text, math, count, sum, statistical, and lookup functions. Each function is described with its syntax and examples, such as LEFT(), GCD, COUNTIF, AVERAGE, and INDEX-MATCH. The document serves as a comprehensive guide for users to understand and apply these functions effectively in Excel.

Uploaded by

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

Excel Functions 1

The document outlines various Excel functions categorized into text, math, count, sum, statistical, and lookup functions. Each function is described with its syntax and examples, such as LEFT(), GCD, COUNTIF, AVERAGE, and INDEX-MATCH. The document serves as a comprehensive guide for users to understand and apply these functions effectively in Excel.

Uploaded by

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

LAB 1 TASKS

TEXT FUNCTIONS IN EXCEL


1. LEFT()
Returns the leftmost characters from a text value.
For example, =LEFT(A2,4)
returns the first four characters in cell A2.

2. RIGHT()
Returns the rightmost characters from a text value.
For example, =RIGHT(A2,4)
returns the last four characters in cell A2.

3. MID()
Returns a specific number of characters from a text string starting at a specified position.
For example, =MID(A2,6,5)
returns five characters starting at the sixth position in cell A2

4. CONCATENATE()
Joins several text items into one text item
For example, =CONCATENATE(A5,A8), will joint the text values present in cells A5 and
A8. We can concatenate any number of cells.

5. LEN()
Returns the number of characters in a text string, including spaces.
For example, =LEN(A2)
returns the number of characters in cell A2

6. LOWER()
Converts text to lowercase.
For example, =LOWER(A2) converts the text in cell A2 to lowercase.
7. UPPER()
Converts text to Uppercasecase.
For example, =UPPER(A2) converts the text in cell A2 to uppercase.

8. PROPER ()
Capitalizes the first letter in each word of a text value.
For example, =PROPER(A2) converts the text in cell A2 to Propercase.
9. TEXT()
Converts numbers to text using format codes. For example, you can use this function to
display numbers in a more readable format or combine numbers with text or symbols.
The formula is =Text(Value, format_text)

=TEXT(1234.567,"$#,###.##") : Currency with a thousands separator and 2 decimals, like


$1,234.57. Note that Excel rounds the value to 2 decimal places.

=TEXT(NOW(),"H:MM AM/PM")

=TEXT(0.285,"#.#%") Percentage, like 28.5%

=TEXT(4.34 ,"# ?/?") Fraction, like 4 1/3

=TEXT(12200000,"0.00E+00") Scientific notation, like 1.22E+07

10. REPLACE()
REPLACE replaces part of a text string, based on the number of characters you specify, with
a different text string.
Syntax : =REPLACE(old_text, start_num, num_chars, new_text)

LAB 2 TASKS
MATH FUNCTIONS IN EXCEL
1. GCD
The Excel GCD function returns the greatest common divisor of two or more supplied
integers.

The syntax of the function is:

=GCD( number1, [number2], ...)


Where the number arguments are up to 255 numeric values for which you want to calculate
the greatest common divisor.
If any of the supplied numbers are decimals, these values are truncated to integers.

2. LCM
The Excel LCM function returns the least common multiple of two or more supplied integers.

The syntax of the function is:

=LCM( number1, [number2], ...)


Where the number arguments are up to 255 numeric values for which you want to calculate
the least common multiple.
If any of the supplied numbers are decimals, these values are truncated to integers.

3. SUM
The Excel SUM function adds together a supplied set of numbers and returns the sum of
these values.

The syntax of the function is:

=SUM( number1, [number2], ... )


where the number arguments are a set of numbers (or arrays of numbers) that you want to
find the sum of.
4. POWER
The Excel Power function calculates a given number, raised to a supplied power.

The syntax of the function is:

=POWER( number, power )


where the number and power arguments are numeric values.

5. SQRT

The Excel Sqrt function calculates the positive square root of a supplied number.

The syntax of the function is:

=SQRT( number )
where the number argument is the numeric value that you want to find the square root of.
If the supplied number is negative, the Sqrt function returns the #NUM! error.
6. PRODUCT

The Excel PRODUCT function returns the product (multiplication) of a supplied set of
numerical values.

The syntax of the function is:

=PRODUCT( number1, [number2], ... )


where the number arguments are a set of numbers (or arrays of numbers) that you want to
calculate the product of.

7. COMBIN:
Returns the number of combinations for a given number of items. Use COMBIN to determine
the total possible number of groups for a given number of items.
The syntax of the function is:

=COMBIN(number, number_chosen)

Where,

 Number Required. The number of items.


 Number_chosen Required. The number of items in each combination.

8. ROUND

The ROUND function rounds a number to a specified number of digits. For example, if
cell A1 contains 23.7825, and you want to round that value to two decimal places, you
can use the following formula:

=ROUND(A1, 2)
The result of this function is 23.78.
9. RANDBETWEEN(bottom, top)
It generates a random integer between two specified numbers. A new
Random integer is generated everytime the formula is run.

Syntax

=RANDBETWEEN(bottom, top)

Where,

 Bottom Required. The smallest integer RANDBETWEEN will return.

 Top Required. The largest integer RANDBETWEEN will return.

LAB 3 TASKS

Working with COUNT functions :


COUNT, COUNTA, COUNTIF, COUNTIFS

1.COUNT Function : The COUNT function counts the number of cells that
contain numbers , dates, or a text representation of numbers (for example, a
number enclosed in quotation marks, such as "1") are counted.
Syntax

=COUNT(value1, [value2], ...)

Where,

 value1 Required. The first item, cell reference, or range within which you
want to count numbers.

 value2, ... Optional. Up to 255 additional items, cell references, or ranges


within which you want to count numbers.

2.COUNTA function : The COUNTA function counts the number of cells


that are not empty in a range. The COUNTA function counts cells
containing any type of information, including error values and empty text
(""). If you want to count only cells that contain numbers), use
the COUNT function.

Syntax:

=COUNTA(value1, [value2], ...)

Where, value1 Required. The first argument representing the values that you want to
count.
3. COUNTIF function: COUNTIF is one of the statistical functions, to
count the number of cells that meet a single criterion.for example, to count
the number of times a particular city appears in a customer list.

Syntax:

=COUNTIF(range, criteria)

Where,

range: The group of cells you want to count

criteria : A number, expression, cell reference, or text string that determines


which cells will be counted. Be sure to enclose the criteria argument in
quotes.

Examples :

=COUNTIF(A2:A5,"apples") Counts the number of cells with apples


in cells A2 through A5.
=COUNTIF(A2:A5,A2)+COUNTIF(A2:A5, Counts the number of apples (the value
A3) in A2), and oranges (the value in A3) in
cells A2 through A5
=COUNTIF(B2:B5,">55") Counts the number of cells with a value
greater than 55 in cells B2 through B5.
=COUNTIF(B2:B5,">=32")- Counts the number of cells with a value
COUNTIF(B2:B5,"<=85") greater than (>) or equal to (=) 32 and
less than (<) or equal to (=) 85 in cells
B2 through B5.
=COUNTIF(A2:A5,"*") Counts the number of cells containing
any text in cells A2 through A5. The
asterisk (*) is used as the wildcard
character to match any character

4.COUNTIFS function : This function helps with the count of cells that meets
one or more criteria (multiple). It can be used with criteria based on dates,
numbers , text etc.
Syntax:

=COUNTIF(range1,criteria1,[range2],[criteria2]…)

Where,

range1 : First range to evaluate

criteria1: Criteria to be used on first range

Lab 4 Tasks
SUM , SUMIF, SUMIFS Functions

SUM function

The SUM function adds values. You can add individual values, cell references
or ranges or a mix of all three.

 =SUM(A2:A10) Adds the values in cells A2:10.

 =SUM(A2:A10, C2:C10) Adds the values in cells A2:10, as well as cells


C2:C10.

SUMIF function

SUMIF function is used to sum the values in a range that meet criteria that you
specify. For example, suppose that in a column that contains numbers, you want
to sum only the values that are larger than 5. You can use the following
formula: =SUMIF(B2:B25,">5")

NOTE : If you want, you can apply the criteria to one range and sum the
corresponding values in a different range. For example, the
formula =SUMIF(B2:B5, "John", C2:C5) sums only the values in the range
C2:C5, where the corresponding cells in the range B2:B5 equal "John."
Syntax

=SUMIF(range, criteria, [sum_range])

Where,

range Required. The range of cells that you want evaluated by criteria.

criteria Required. The criteria in the form of a number, expression, a cell


reference, text, or a function that defines which cells will be added.

sum_range Optional. The actual cells to add, if you want to add cells
other than those specified in the range argument. If
the sum_range argument is omitted, Excel adds the cells that are
specified in the range argument (the same cells to which the criteria is
applied).

Example:
SUMIFS function The SUMIFS function in Excel adds up cells in a range
that meet multiple criteria:

Syntax

SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2,


criteria2], ...)

 =SUMIFS(A2:A9,B2:B9,"=A*",C2:C9,"Tom")

 =SUMIFS(A2:A9,B2:B9,"<>Bananas",C2:C9,"Tom")

Where,

Sum range : The range of cells to Sum

Criteria range 1 (req) : The range that is tested using criteria 1.

Criteria_range2,… : Additional ranges and their associated Criteria.


LAB 5 tasks

Statistical functions in Excel

1.AVERAGE : Returns the average (arithmetic mean) of the arguments.


For example, if the range A1:A20 contains numbers, the
formula =AVERAGE(A1:A20) returns the average of those numbers.

Syntax

=AVERAGE(number1, [number2], ...)


Arguments can either be numbers or names, ranges, or cell references that
contain numbers.

If a range or cell reference argument contains text, logical values, or empty


cells, those values are ignored; however, cells with the value zero are included.

2.AVERAGEIF function

Returns the average (arithmetic mean) of all the cells in a range that meet a
given criteria.
Syntax

=AVERAGEIF(range, criteria, [average_range])

 Range Required. One or more cells to average, including numbers or


names, arrays, or references that contain numbers.

 Criteria Required. The criteria in the form of a number, expression, cell


reference, or text that defines which cells are averaged. For example,
criteria can be expressed as 32, "32", ">32", "apples", or B4.

 Average_range Optional. The actual set of cells to average. If omitted,


range is used.
3.MIN, MAX, SMALL, LARGE FUNCTIONS

4.MOD function
Returns the remainder after number is divided by divisor. The result has the
same sign as divisor.Syntax

=MOD(number, divisor)
5.STDEV.S function

Estimates standard deviation based on a sample (ignores logical values and text
in the sample).

The standard deviation is a measure of how widely values are dispersed from
the average value (the mean).

=STDEV.S(number1,[number2],...)

STDEV.S uses the following formula:

where x is the sample mean AVERAGE(number1,number2,…) and n is the


sample size.

5.VAR.S function : Variance is a statistical measure used across a set of


values to identify the amount that the values vary from the average value.

Syntax:
=VAR.S(number1,[number2],…)

Arguments can either be numbers or names, arrays, or references that


contain numbers.

Logical values and text representations of numbers that are typed


directly into the list of arguments are counted by this function.
INDEX AND MATCH FUNCTIONS

What is INDEX Function in Excel


The INDEX function in Excel is very powerful at the same time a flexible tool
that retrieves the value at a given location in a range. In another word, It
returns the content of a cell, specified by row and column offset.
INDEX Function Syntax in Excel:
=INDEX(ARRAY, [row], [column])
Parameters:
 array: The data range where the lookup is performed.
 row_num: The row number of the value to retrieve.
 column_num (optional): The column number of the value to retrieve.

How to Use INDEX Function in Excel


Follow the below steps to learn how to use INDEX Function in Excel:
Step 1: Select the Data Range
Identify the range where your data is stored, such as A1:C10.
Step 2: Specify the Row Number
Enter the row number that contains the data point you need.
Step 3: Specify the Column Number
If your array is more than one column wide, you can enter a column number to
locate the exact cell.

Outputs:
 If neither the row nor the column is specified, the INDEX function will
return the entire data range.
 If only the row number is provided, the INDEX function will return all
values in that row within the range.
 When both the row and column numbers are specified, the INDEX function
will return the value from the specific cell.
 If only the column number is provided, the INDEX function will return all
values from that column within the range.
What is MATCH Function in Excel
The MATCH function in Excel is used to locate the position of a specific value
within a row, column, or array. Unlike VLOOKUP or HLOOKUP, the MATCH
function does not return the actual data but instead provides the relative position
of the value. It is case-insensitive and works seamlessly in both horizontal and
vertical ranges.
MATCH Function Syntax
=MATCH(search_key, range, [search_type])
How to Use MATCH Function in Excel
Follow the below steps to learn how to use MATCH Function in Excel:
Step 1: Choose the Lookup Value
Identify the specific value you want to locate within your dataset. This could be
a number, text, or a cell reference.
Step 2: Select the Lookup Range
Define the one-dimensional range (row or column) where Excel should search
for the lookup value.
Step 3: Specify the Match Type
 Use 0 for an exact match.
 Use 1 for an approximate match in ascending order.
 Use -1 for an approximate match in descending order.

INDEX MATCH Excel Function Combination


Example: Let’s say the task is to find the cost of Masala Dosa. It is known that
column 3 represents the cost of items, but the row position of Masala Dosa is
not known. The problem can be divided into two steps-
Step 1: Find the Row Position
Find the position of Masala Dosa by using the formula:
=MATCH(“Masala Dosa”,B3:B10,0)
Here B3:B10 represents Column “Food” and 0 means Exact Match. It will
return the row number of Masala Dosa.

Step 2: Use INDEX Function


Find the cost of Masala Dosa. Use the INDEX Function to find the cost of
Masala Dosa. By substituting the above MATCH function query inside the
INDEX function at the place where the exact position of Masala Dosa is
required, and the column number of cost is 3 which is already known.
=INDEX(B3:F10, MATCH(“Masala Dosa”, B3:B10 , 0) ,3)
Two-Way Lookup with INDEX and MATCH
In the above example, the column position for the cost was hardcoded. If you
want to make the column lookup dynamic as well, use a MATCH function for
the column position.
Example: Find the cost of “Masala Dosa” dynamically:
=INDEX(B3:F6, MATCH(“Masala Dosa”, B3:B6, 0), MATCH(“Cost”,
B3:F3, 0))

LAB 6 tasks

Conditional Formatting in Excel

How to Do Conditional Formatting in Excel: Quick Steps


 Select the Cells to Format
 Go to the Home Tab >> Click on Conditional Formatting
 Choose a Formatting Rule
 Set Your Condition and Formatting Style
 Click OK
What is a Conditional Formatting
Conditional Formatting is a feature in an Excel spreadsheet. It is used to
maintain the status of the result easily. It is most often used as color-based
formatting to highlight, emphasize, or differentiate among data and information
stored in an Excel spreadsheet.

Excel conditional formatting is a highly useful feature. It can make it easier for
you to draw attention to the key details in your spreadsheets and quickly
identify differences in cell values.

Conditional Formatting Types

1. Highlight Cells Based on Values


The Highlight Cell Rules feature allows you to format cells based on
conditions like greater than, less than, between, or containing specific text.
Step 1: Select the Column
Select the Column in which you want to apply conditional formatting. Here we
have selected Column C(Salary).
Step 2: Choose Conditional Formatting
Go to Home Tab, Click on Conditional Formatting, Select Highlight Cells
Rules and Click on Greater Than.
Enter the value you want to highlight, choose a formatting style, and
click OK.
2. Clear Rules
If you need to remove Conditional Formatting, use the Clear Rules option.
Step 1: Click on Clear Rules
Go to Home > Conditional Formatting > Clear Rules and Select Choose
Clear Rules from Selected Cells (or Entire Sheet).

3. Top/Bottom Rules – Identifying Outliers

Top/Bottom Rules highlight the highest or lowest values in a dataset.


Example: Highlight the Top 3 Performers
Step 1: Select the Cells
Select the Performance Score column (Column D) D2:D9.

Click Home > Conditional Formatting > Top/Bottom Rules > Top 3.
This will highlight the top 3 employees with the highest performance scores.
4. Conditional Formatting with Formulas

Using formulas in Conditional Formatting allows you to create custom rules


beyond the built-in options.
Example: Highlight Employees in the Sales Department
Step 1: Select the Dataset
Select the Data Range (A1:E9).

Step 2: Select the New Rule


 Go to Home > Conditional Formatting > New Rule.
 Select Use a formula to determine which cells to format.
 Enter the formula
=$B2="Sales"
All employees in the Sales department will be highlighted.

5. Using Color Scales to Visualize Data

Example: Apply a Color Scale to Bonus Percentage


Step 1: Select the Bonus Column
Select the Bonus column (E2:E9).
Step 2: Select the Color Scales and Choose the Color Scales
Go to Home Tab, Select the Conditional Formatting, Click on the Color Scales
and Choose a Red-Yellow-Green scale (or any other preferred scale).
 Green: Highest bonus percentage.
 Yellow: Medium values.
 Red: Lowest bonus percentage.
6. Highlighting Blank or Duplicate Cells

Sometimes, blank cells indicate missing data. Conditional Formatting can help
identify them easily.
Example: Highlight Empty Cells in the Dataset
Step 1: Select the entire dataset
Select the Entire Dataset. (In the below example we have selected A2:E9)

Click Home > Conditional Formatting > New Rule.

Step 2: Select Format only cells that contain.


 In the drop-down, choose Blanks.
 Click Format, pick a color (e.g., Green), and click OK.
How to Edit Conditional Formatting in Excel
You can easily modify an existing Conditional Formatting Rule in Excel by
following these steps:
Step 1: Select the Cells
 Click on any cell that has a conditional formatting rule applied.
Step 2: Open the Rules Manager
 Go to the Home tab, click Conditional Formatting, and select Manage
Rules.

How to Remove Conditional Formatting


Method 1: Remove Conditional Formatting Using the Clear Rules Option
 Highlight the cell range that contains the conditional formatting you want to
remove.
 Click on the Home tab, click Conditional Formatting.
 Choose Clear Rules from the drop-down menu. from Selected Cells or
from Entire Sheet

Method 2: Remove Specific Conditional Formatting Using the Rules Manager


Select the Cells
 Go to the Home tab, click Conditional Formatting, and select Manage
Rules from the drop-down menu.
 Select the rule you want to remove and click Delete Rule.
Method 3: Keyboard Shortcut to Remove Conditional Formatting
 Select the range of cells from which you want to remove the conditional
formatting.
 Press Alt + H + E + F on your keyboard.

LAB TASK 7 (17th Feb)


Array Formulas in EXCEL
An Array in Excel is the structure that holds a collection of data.
These data can be in the form of numbers or texts. There could be an
array of 1-D or 2-D as well in Excel. For example, the array of fruits
in excel would be written something like this:-

{“Apple”, “Banana”, “Grapes”, “Guava”}

Array formulas
Array formulas enable to process of several values and give several
outputs. In a simple world, it can do multiple calculations and reduce
a lot of human efforts. In other words, we can say that it solves array
calculations and give an array as output too. Let’s understand more of
them with an example, of students with their test marks,

Array formulas use standard formula syntax. They all begin with an
equal (=) sign, and you can use most of the built-in Excel functions in
your array formulas. The key difference is that when using an array
formula, you press Ctrl+Shift+Enter to enter your formula.
How to insert an Array Formula?
Before entering the Array formula fir of all we understand some
important points about the Array formula:
 After typing the formula you have to press keys
CTRL+SHIFT+ENTER together. It will automatically change the
normal formula into an array formula.
 If you manually type braces around the formula then it will not
convert the formula into an array formula. You have to use
CTRL+SHIFT+ENTER keys to convert the formula into an array
formula.
 Whenever you edit the array formula the braces will disappear
automatically and you have to again press the combination of
CTRL+SHIFT+ENTER keys.
 If you forget to press the CTRL+SHIFT+ENTER keys then your
formula will work as the normal formula.

LAB 8 TASKS
What-if Analysis
What-If Analysis in Excel is a tool that lets you change values in cells to
see how that affects the result of formulas.
What-If Analysis tools
 Scenario Manager: Create and save multiple sets of input values and
compare their results
 Goal Seek: Find the input value needed to achieve a desired result
 Data Tables: Examine how changing one or two input values will impact
a financial model.

How to use What-If Analysis


1. Go to the Data option from the toolbar
2. Select the What-if Analysis option from the Forecast Ribbon
3. Add a scenario by selecting the + symbol
4. Enter the desired change for each cell
5. Hit OK when completed to return to the scenarios list

Scenario Manager
Scenario Manager, helps users analyze multiple scenarios based on different
sets of input values.
Helps in decision-making by comparing different situations.

Goal Seek
Goal Seek is a powerful Excel tool used to find the necessary input
value to achieve a desired output. Instead of manually changing
values, Goal Seek automatically calculates the required input.

LAB 9 TASKS
 CREATING A TABLE FROM DATA
 REMOVING DUPLICATES FROM DATA

CREATING A TABLE FROM DATA

1. Select a cell within your data.


2. Select Home > Format as Table. click Table (or simply press Ctrl + T).
3. Choose a style for your table.
4. In the Create Table dialog box, set your cell range.
5. Mark if your table has headers.
6. Select OK.

You can also convert text to a table. To do this:


1. Select the text you want to convert
2. Click Insert > Table > Convert Text to Table
3. Choose the options you want
4. In the Table size section, make sure the numbers match the number of columns
and rows you want
5. In the Fixed column width box, type or select a value
REMOVING DUPLICATES FROM DATA

1. Select a cell within the range of data that has duplicates


2. Select the Data tab
3. In the Data Tools group, click Remove Duplicates
4. Select the columns where you want to remove duplicates
5. Click Remove Duplicates
6. Click OK to confirm
When you remove duplicate values, the only effect is on the values in the range
of cells or table. Other values outside the range of cells or table will not change
or move. When duplicates are removed, the first occurrence of the value in the
list is kept, but other identical values are deleted.

To save Removed Values.


LAB 10 TASKS

Working with Filters on data

1. Creating Simple Text and Numeric Filters.


2. Creating Compound filters.
3. Creating Multiple value filters.
Compound Filters
Compound filters build on each other.
First apply a Criteria on one column.
Then on the search results, apply another criteria.

Creating Multiple value Filters (using Advanced filter)


If the data you want to filter requires complex criteria (such as region = "East"
OR Salesman = "Alexander"), you can use the Advanced Filter dialog box.

To open the Advanced Filter dialog box, click Data > Advanced.
The Advanced command works differently from the Filter command in several
important ways.

 It displays the Advanced Filter dialog box instead of the AutoFilter menu.

 You type the advanced criteria in a separate criteria range on the worksheet
and above the range of cells or table that you want to filter. Microsoft
Office Excel uses the separate criteria range in the Advanced Filter dialog
box as the source for the advanced criteria.

LAB 11 TASKS

Data Validation

Use data validation in Excel to make sure that users enter certain values
into a cell.

Input Message
An input message appears when the user selects the cell and tells the user what
to enter.
On the Input Message tab:
1. Check 'Show input message when cell is selected'.
2. Enter a title.
3. Enter an input message.
Error Alert
If users ignore the input message and enter a number that is not valid, you can
show them an error alert.
On the Error Alert tab:
1. Check 'Show error alert after invalid data is entered'.
2. Enter a title.
3. Enter an error message.

Example : Date restriction


Example : Whole Number restriction
Example : Drop down-list
LAB TASK 12

MACROS
A macro in Excel is a set of instructions that automates tasks. You can use
macros to save time, reduce repetitive work, and improve efficiency.

If you have tasks in Microsoft Excel that you do repeatedly, you can record a
macro to automate those tasks. A macro is an action or a set of actions that you
can run as many times as you want. When you create a macro, you are
recording your mouse clicks and keystrokes. After you create a macro, you can
edit it to make minor changes to the way it works.

You might also like