? MS Excel for Data Analysis❗_
? MS Excel for Data Analysis❗_
Rahul Sharma
Data Analyst
1
MS EXCEL (FOR DATA ANALYSIS)
a. By Condition Formating –
b. Remove duplicates –
Go to Data tab in Data Tool ribbon select Remove Duplicates now check
the column that contains duplicate value then click ok, this will remove it.
c. By UNIQUE Function –
Type =UNIQUE (select array). This will gives you the Unique vales only.
d. By POWER QUERY –
Select your data which contain all the values then go to Data tab in Get &
Transform ribbon and select From Table/Rang, now select all the columns
that contains duplicates press Right Click And select Remove Duplicates,
last click on Load/Transform data to get the final output data in your sheet.
1. By Goto Special –
Select all the data rang and press F5, now select Blanks and press Ok, this
will show you all the Mark blank values then press Ctrl + - (Sign) then
choose Row/Columns. this will remove the blanks Rows/Columns.
Rahul Sharma
2
3. Text To Column
Select the data/cells containing the text you want to split. Go to Data tab and
click Text to Column then choose the Delimiter and check the Preview how it
looks, then choose the Destination Click Ok.
4. Data Validation
Add Error Alert Message that appears when invalid data is entered
only.
5. Flash Fill
Enter the data exactly in format and pattern you want to extract then
go to Data tab and click Flash fill in Data Tool ribbon.
By Shortcut – Enter your data you want, then just Select that column
range where you recently entered the data now click Ctrl + E, that will
automatic flash fill your data according your format and pattern.
Rahul Sharma
3
FORMULA’S FOR DATA ANALYSIS (EXCEL)
I. STATISTICAL FUNCTIONS :-
1. AVERAGE :-
2. MEDIAN :-
3. MODE :-
4. STDEV.S :-
5. VAR.S :-
6. MAX :-
7. MIN :-
8. LARGE :-
The large function returns the K-th largest value in a rang or dataset.
K-th position (rank) of the value you want to find.
Rahul Sharma
5
9. SMALL :-
The Small function return the K-th smallest value in a rang or dataset.
10. PERCENTILE.INC :-
11. QUARTILE.INC :-
Rahul Sharma
6
includes the data's endpoints (the smallest and largest values) in its
calculation. You use it to understand the distribution of your data.
Example -
1. SUM :-
The SUM formula in Excel is used to add up a range of numbers. It's
one of the most basic and commonly used functions. You can use it to
add values in a series of cells.
2. PRODUCT :-
3. POWER :-
Rahul Sharma
7
The POWER function helps you find the result when you multiply a
number by itself a specified number of times.
Example –
4. SQRT :-
5. ROUND :-
Rahul Sharma
8
6. INT :-
Example = Suppose you have the number 8.75 and you want to
round it down to the nearest integer.
= INT (8.75)
Result = 8
7. ABS :-
The ABS formula in Excel is used to return the absolute value of a
number. The absolute value is the number without its sign, meaning it
always gives a non-negative result.
8. MOD :-
Example –
Suppose you have a small list of items with their quantities and prices,
and you want to calculate the total cost.
A B C D
Item Quantity Price Total Cost
Apples 2 3
Oranges 3 2
Bananas 5 1.5 17.5
1. IF :-
Rahul Sharma
10
2. IFS :-
The IFS function in Excel is used to test multiple conditions and return
a value corresponding to the first true condition. It's a more
streamlined and readable alternative to nested IF statements.
Example =IFS (A2 >= 90, "A", A2 >= 80, "B", A2 >= 70, "C")
3. AND :-
Example -
Suppose you want to check if a student passed both Math and Science
exams, and passing is defined as scoring 50 or more in each subject.
4. OR :-
Rahul Sharma
11
Example -
Suppose you want to check if a student passes either Math or Science,
where passing is defined as scoring 50 or more.
5. NOT :-
Example –
Suppose you want to check if a student did not pass a test where
passing is defined as scoring 50 or more.
6. IFERROR :-
Example –
Suppose you have a formula that might result in an error, such as
division by zero.
Rahul Sharma
12
A B C
Number 1 Number 2 Result
10 2 5
15 0 Your Error Message
20 5 4
7. IFNA :-
Example –
Suppose you have a formula that might result in an #N/A error, such as
a VLOOKUP that doesn't find a match.
A B C
ID Name Lookup Result
1 Alice Alice
2 Bob Bob
3 Carol Carol
4 Not Found (this is you NA
message)
8. LET :-
Example –
Suppose you want to calculate the area of a rectangle, where the length
is 10 and the width is 5. You can use the LET function to store these
values and then calculate the area.
A B C
Length 10 50 (it is the area of triangle)
Width 5
9. XOR :-
Example –
Suppose you want to check if a student passed exactly one of two
subjects, Math and Science. To pass, a student needs a score of 50 or
more in each subject.
A B C
Math Science XOR
45 65 TRUE
55 40 TRUE
50 50 FALSE
80 90 FALSE
Rahul Sharma
14
1. VLOOLUP :-
Formula -
=VLOOKUP (lookup_value,table_array,col_index_num,[True/False])
Example –
Suppose you have a list of employees with their IDs and salaries, and
you want to find the salary of a specific employee based on their ID.
A B C
Employee ID Salary Lookup Result
101 50000
102 55000 55000
103 60000
104 65000
2. HLOOKUP :-
Formula -
HLOOKUP(lookup_value,table_array,row_index_num,[range_looku])
Example –
Rahul Sharma
15
Suppose you have a table of quarterly sales data for different regions,
and you want to find the sales for a specific region in Q2.
Q1 Q2 Q3 Q4
North 1000 2000 1500 1800
South 900 2100 1600 1700
East 1100 1900 1400 1750
West 1200 2200 1550 1850
Result 1900
3. XLOOKUP :-
The XLOOKUP function in Excel is a powerful and versatile function
used to search for a value in a range and return a corresponding value
from another range. It's a more advanced and flexible alternative to the
VLOOKUP and HLOOKUP functions.
Formula =
XLOOKUP(lookup_value, lookup_array, return_array,[if_not_found])
Example –
Suppose you have a list of product IDs and their corresponding prices,
and you want to find the price of a specific product.
A B C
Product ID Price Lookup Result
P001 25
P002 35 35
P003 45
P004 55
4. INDEX :-
Rahul Sharma
16
The INDEX function in Excel is used to return the value of an element
in a table or range, based on the specified row and column numbers.
It's very versatile and can be combined with other functions to perform
complex lookups and data retrievals.
Example –
Suppose you have a table of sales data for different products and
regions, and you want to find the sales figure for a specific product in
a specific region.
= INDEX (C2:C5, 3)
A B C D
Product Region Sales
Apples North 1000
Oranges South 1500
Bananas East 1200 1200
Grapes West 2000
5. MATCH :-
Example –
Suppose you have a list of products, and you want to find the position
of a specific product in that list.
Rahul Sharma
17 Oranges
Bananas 3
Grapes
6. LOOKUP :-
Example –
Let's say you have a list of product IDs and their corresponding prices,
and you want to find the price of a specific product.
7. OFFSET :-
Example –
Rahul Sharma
18
Imagine you have a table of sales data and you want to dynamically
reference the sales value for a specific product.
= OFFSET (B2, 2, 1)
Explanation:
• Formula: =OFFSET(B2, 2, 1)
• reference: B2 (starting point).
• rows: 2 (move down 2 rows).
• cols: 1 (move right 1 column)
A B C D E
Product Q1 Q2 Q3
Apples 100 200 300
Oranges 150 250 350
Bananas 120 220 320 220
8. INDIRECT :-
9. ROW/ROWS :-
Example –
= ROW (A2), this will return the row index means 2nd row.
Rahul Sharma
19
Example –
= ROWS ( rang ), this will give the count of rows of the range.
10. COLUMN/COLUMNS :-
Example –
= COLUMN (D1), this will return col index means 4th no. col.
Example –
= COLUMNS (B2:D2) in any cell, it will return 3 because the
range B2:D2 spans 3 columns.
11. CHOOSE :-
Rahul Sharma
20
Example –
Suppose you have a list of fruits, and you want to select a fruit
based on an index number.
A B
Index Fruit
1 Apple
2 Banana
3 Cherry
4 Date
12. FILTER :-
Example –
Suppose you have a list of products with their categories and prices, and
you want to filter out products in the "Fruits" category.
A B C E F G
Product Category Price Product Category Price
Apples Fruits 100 Apples Fruits 100
Carrots Vegetables 50 Bananas Fruits 80
Bananas Fruits 80
Potatoes Vegetables 60
V. TEXT FUNCTIONS :-
Rahul Sharma
21
1. CONCATENATE :-
2. LEFT :-
3. RIGHT :-
4. MID :-
Rahul Sharma
22
The MID function in Excel is used to extract a specific number of
characters from the middle of a text string, starting at a specified
position. This can be very handy when you need to pull out a portion of
text from within a larger string.
5. LEN :-
6. FIND :-
Example –
Suppose you have a list of sentences, and you want to find the position
of the word "Excel" in each sentence.
Rahul Sharma
23
A B
Sentence Position
Learning Excel is fun! 10
Excel is a powerful tool. 1
I love using Excel. 14
7. SUBSTITUTE :-
Example –
Suppose you have a list of product descriptions, and you want to replace
all instances of "blue" with "green".
A B
Product Description Modified Description
Blue Jacket Green Jacket
Blue T-Shirt Green T-Shirt
Blue Jeans Green Jeans
8. TRIM :-
The TRIM function in Excel is used to remove all extra spaces from a
text string, leaving only single spaces between words and no leading or
trailing spaces. This is particularly useful when you're dealing with data
that may have inconsistent spacing.
Rahul Sharma
24
Formula = TRIM (text)
1. TODAY :-
2. NOW :-
The NOW function in Excel returns the current date and time. It
automatically updates to the current date and time each time the
worksheet is recalculated or opened. This function is useful for tracking
real-time updates in your spreadsheets.
Formula = NOW ()
3. DATE :-
Rahul Sharma
25
4. TIME :-
1. SUMIF :-
The SUMIF function in Excel is used to sum the values in a range that
meet a specific condition. This is very useful for situations where you
only want to add up numbers that match a certain criterion.
Example –
Suppose you have a list of sales data, and you want to sum the sales for
a specific product.
A B C
Product Sales
Apples 100 300
Oranges 150
Apples 200
Bananas 50
Oranges 100
2. COUNTIF :-
Rahul Sharma
26
The COUNTIF function in Excel is used to count the number of cells in
a range that meet a specific condition. It's a handy function for quickly
summing up the number of times a criterion is met within your data.
Example –
Suppose you have a list of students' grades, and you want to count how
many students scored an "A".
=COUNTIF(B2:B6, "A")
A B C
Student Grade Count of A's
John A 3
Jane B
Emily A
David C
Sarah A
3. AVERAGEIF :-
Example –
Suppose you have a list of students' grades, and you want to calculate
the average grade for a specific subject.
A B C D
Student Subject Grade Average
John Math 85 89.33
Rahul Sharma
27 Jane Science 90
Emily Math 95
David Science 80
Sarah Math 88
1. TRANSPOSE :-
Example –
Suppose you have a vertical list of numbers that you want to convert to a
horizontal row.
=TRANSPOSE(A1:A4)
A B C D E F G
1 1 2 3 4
2
3
4
2. SEQUENCE :-
Rahul Sharma
28
Formula = SEQUENCE (rows, [columns], [start], [step])
Example –
Suppose you want to create a table of numbers with 3 rows and 4
columns, starting at 5 and incrementing by 2.
= SEQUENCE(3, 4, 5, 2)
A B C D
5 7 9 11
13 15 17 19
21 23 25 27
Explanation:
rows: 3 (creates a sequence with 3 rows)
columns: 4 (creates a sequence with 4 columns)
start: 5 (starts the sequence at 5)
step: 2 (increments each subsequent number by 2)
1. SORT :-
Example –
Suppose you have a list of items with their quantities, and you want to
sort the items by quantity in ascending order.
A B
Item Quantity
Apples 10
Rahul Sharma
29 Oranges 5
Bananas 8
Grapes 15
= SORT (A2:B5, 2, 1)
A B
Oranges 5
Bananas 8
Apples 10
Grapes 15
2. FILTER :-
Example –
Suppose you have a list of products and their quantities, and you want
to filter out products with quantities greater than 5.
A B
Product Quantity
Apples 10
Oranges 3
Bananas 8
Grapes 15
A B
Product Quantity
Apples 10
Bananas 8
Grapes 15
Rahul Sharma
30
THANK YOU!
Follow for more :
https://linkedin.com/in/rahul-sharma-5174b4307
https://github.com/RahulSharmaAnalyst
Rahul Sharma