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

Excel Training Manual

The MS Excel Workshop Guide provides an overview of Excel's functionalities, including data organization, analysis, and visualization. It covers essential topics such as data types, best practices for data entry, shortcuts, sorting, filtering, and advanced features like formulas, pivot tables, and macros. The guide is designed to enhance users' proficiency in Excel for various applications, including business analysis and project management.

Uploaded by

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

Excel Training Manual

The MS Excel Workshop Guide provides an overview of Excel's functionalities, including data organization, analysis, and visualization. It covers essential topics such as data types, best practices for data entry, shortcuts, sorting, filtering, and advanced features like formulas, pivot tables, and macros. The guide is designed to enhance users' proficiency in Excel for various applications, including business analysis and project management.

Uploaded by

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

MS Excel

Workshop Guide

Contributors:

Mr.Kumaravelan Kaadai, XLCoach


Ms.Deepa K, XLCoach

Reviewer
Ms.Nithya Subramaniam, Meark Enterprise
Table of Contents

Table of Contents 2
Introduction about MS Excel 3
Types of Data & Best Practices for Entering Data in Excel 7
Excel ShortCuts 8
Sorting in Excel 9
Filters in Excel 11
Formulas and Functions in Excel 13
Subtotal and Aggregate Function 17
Date Functions in Excel 19
Conditional Formatting 21
Understanding Cell References in Excel 24
Goal Seek 25
LOOKUP Function- VLOOKUP, HLOOKUP & XLOOKUP 26
Pivot Tables in Excel 28
Data Validation 30
Protecting Cells & Hiding Formulas 32
Macro in Excel 33
Power Query 37

www.xlcoach.in Mobile@ 80567 63406 [email protected] 2


Introduction about MS Excel
MS Excel is a powerful spreadsheet application developed by Microsoft, part of the
Microsoft Office suite. It is widely used for data organization, calculation, analysis, and
visualization. Excel allows users to create and manipulate spreadsheets, which consist of
cells arranged in rows and columns. It offers a range of functionalities including complex
formulas, pivot tables, and various charting options, making it a versatile tool for personal,
academic, and professional use.

Benefits of MS Excel

1. Data Organization: Efficiently organizes large sets of data with rows, columns, and
sheets.
2. Data Analysis: Advanced tools for data analysis such as pivot tables, filters, and
conditional formatting.
3. Calculations: Supports complex calculations using formulas and functions.
4. Visualization: Offers various chart types and data visualization tools to present data
clearly.
5. Automation: Allows automation of repetitive tasks through macros and VBA (Visual
Basic for Applications).
6. Collaboration: Enables multiple users to work on the same document, especially
with cloud integration.

Applications of MS Excel

● Business Analysis: Financial modeling, budgeting, forecasting, and financial


reporting.
● Data Management: Storing, sorting, and filtering large datasets.
● Academic: Statistical analysis, research data organization, and academic
record-keeping.
● Project Management: Scheduling, tracking progress, and resource allocation.
● Personal Finance: Managing personal budgets, expenses, and investments.

Excel as a Spreadsheet

1. Data Organization:
○ Like a traditional ledger, Excel organizes data in a grid of rows and columns.
Each cell in the grid can contain data, a formula, or a function.
2. Calculation and Analysis:
○ Excel allows users to perform complex calculations, much like the arithmetic
done on paper spreadsheets but with greater speed and accuracy.
○ Formulas and functions in Excel can automate calculations, reducing the
potential for human error.
3. Data Management:
○ Excel's features for sorting, filtering, and analyzing data enhance the basic
functionalities of a traditional spreadsheet, making it a powerful tool for
managing large datasets.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 3


4. Visualization:
○ Excel enables users to create charts, graphs, and pivot tables, transforming
raw data into visual insights that are easier to interpret and analyze.

Other Spreadsheet Applications

1. Google Sheets:
○ Web-based, accessible from any device with an internet
connection.Integrates seamlessly with other Google Workspace applications.
2. Apple Numbers:
○ Part of Apple's iWork suite, designed for Mac users with a focus on simplicity
and visual appeal.
3. LibreOffice Calc:
○ Open-source spreadsheet application, part of the LibreOffice suite, offering
similar functionalities to Excel.
4. Zoho Sheet:
○ Web-based spreadsheet application, part of the Zoho Office Suite, known for
its collaboration features and cloud integration.
5. Apache OpenOffice Calc:
○ Another open-source alternative to Excel, part of the Apache OpenOffice
suite.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 4


The key screen elements in MS Excel

1. Workbook:

● The entire file that contains one or more worksheets.

2. Worksheet:

● A single sheet within a workbook, consisting of rows and columns where data is
entered and manipulated.

3. Ribbon:

● The toolbar at the top of the Excel window, containing tabs and commands for
various functionalities. It includes:
○ Tabs: Categories of commands (e.g., Home, Insert, Page Layout).
○ Groups: Collections of related commands within each tab (e.g., Font,
Alignment).
○ Commands: Individual buttons or options within groups (e.g., Bold, Merge &
Center).

4. Formula Bar:

● Located above the worksheet grid, it displays the contents of the active cell and
allows for the entry and editing of data, formulas, and functions.

5. Name Box:

● Situated to the left of the Formula Bar, it shows the address of the active cell and can
be used to navigate to different cells or name ranges.

6. Worksheet Tabs:Found at the bottom of the Excel window, these tabs allow you to switch
between different sheets within a workbook. You can also rename, add, delete, and reorder
sheets here.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 5


7. Columns and Rows:

● Columns: Vertical divisions in the worksheet labeled with letters (A, B, C, ...).
● Rows: Horizontal divisions in the worksheet labeled with numbers (1, 2, 3, ...).

8. Cells:

● The individual boxes formed by the intersection of rows and columns. Each cell has a
unique address (e.g., A1, B2).

9. Status Bar:

● Located at the bottom of the Excel window, it provides information about the current
mode and other details like average, count, and sum of selected cells. It also offers
shortcuts to features like Zoom and Page Layout.

10. Quick Access Toolbar:

● Positioned above the Ribbon, it provides quick access to frequently used commands
(e.g., Save, Undo, Redo). Users can customize it by adding their preferred
commands.

11. Gridlines:

● The faint lines that divide the cells, helping users to differentiate between individual
cells in the worksheet.

12. Scroll Bars:

● Vertical Scroll Bar: Located on the right side of the window, used to scroll up and
down through the worksheet.
● Horizontal Scroll Bar: Located at the bottom of the window, used to scroll left and
right through the worksheet.

13. Zoom Control:

● A slider located in the bottom right corner of the window, used to zoom in or out of
the worksheet for better visibility.

14. Sheet View Options:

● Located at the bottom right, next to the Zoom Control, these buttons allow you to
switch between different views (e.g., Normal, Page Layout, Page Break Preview).

15. File Tab (Backstage View):

● Clicking the File tab opens the Backstage View, where you can manage your files,
such as saving, opening, printing, and sharing workbooks.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 6


Types of Data & Best Practices for Entering Data in Excel
Types of Data in Excel

1. Text Data
○ Includes letters, words, or any alphanumeric characters (e.g., Names,
Addresses).
2. Numeric Data
○ Includes numbers, which can be integers, decimals, or percentages (e.g.,
Quantities, Prices).
3. Date/Time Data
○ Includes calendar dates and time (e.g., 10/11/2024, 12:45 PM).
4. Boolean Data
○ Represents logical values such as TRUE or FALSE.
5. Currency Data
○ Numeric values formatted as currency (e.g., $500, ₹250).
6. Percentage Data
○ Numeric data expressed as percentages (e.g., 25%, 75%).

Important Guidelines for Entering Data in Excel

1. Correct Date Format


○ Ensure dates are entered in the date format as per your system settings
(e.g., MM/DD/YYYY or DD/MM/YYYY).
○ Avoid manually entering text for dates (e.g., “10 October 2024”), which may
not be recognized as a date by Excel.
2. No Initials in Names
○ Avoid using initials in names to prevent confusion and ensure data
consistency.
○ For example, enter "John David" instead of "J. David."
3. No Extra Spaces
○ Avoid adding spaces after the last character of a word or value.
○ Example: Enter "John", not "John " (with an extra space).
4. Leading Zeros in Numbers
○ When entering numbers with leading zeros (e.g., ZIP codes or ID numbers),
add an apostrophe (') before the number.
○ Example: Enter '00123 to retain leading zeros.
5. No Merged Data
○ Avoid merging cells in data columns to maintain easy sorting, filtering, and
data referencing.
○ Keep data in a simple, structured format without merged cells.
6. Unique Data Entries
○ Ensure that each entry is unique if it’s meant for future reference (like
Employee ID, Order Number, etc.).
○ This prevents duplication and allows for more efficient tracking and
referencing.
7. Consistent Time Format
○ Enter time using a colon (:) separator for hours and minutes (e.g., 12:45
PM).
○ Avoid using periods (.), which may cause Excel to misinterpret the value.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 7


Excel ShortCuts
Workbook shortcuts

Ctrl + N: Create a new workbook

Ctrl + O: Open an existing workbook

Ctrl + S: Save a workbook or spreadsheet

Ctrl + W: Close the current workbook

Ctrl + F4: Close Excel

Cell formatting shortcuts

Ctrl + I or Ctrl + 3: Italicize or remove italic formatting

Ctrl + B or Ctrl + 2: Bold or remove bold formatting

Ctrl + U or Ctrl + 4: Underline or remove underline

Editing shortcuts

Ctrl + C: Copy selected cells or text

Ctrl + X: Cut selected cells or text

Ctrl + V: Paste copied cells or text

Paste values in Excel is Alt+E+S+V+Enter


Ctrl + Z: Undo the last action

Ctrl + Y: Redo the last action

Navigation shortcuts

Ctrl + PageDown: Move to the next sheet

Ctrl + PageUp: Move to the previous sheet

Alt + A: Go to the Data tab

Alt + W: Go to the View tab

Other shortcuts

Ctrl + F: Open the Find and Replace dialog box Ctrl + 9: Hide the selected rows

Ctrl + Shift + $: Apply the currency format Ctrl + F1: Displays or hides the Ribbon

Ctrl + 0: Hide the selected columns Ctrl + F2: Displays the print preview area

www.xlcoach.in Mobile@ 80567 63406 [email protected] 8


Sorting in Excel
What is Sorting in Excel?

● Sorting in Excel is the process of arranging data in a particular order based on


selected criteria.
● You can sort data alphabetically, numerically, or based on other factors like dates
or custom lists.
● Sorting can be done in ascending (A to Z, smallest to largest) or descending (Z
to A, largest to smallest) order.

Purpose of Sorting in Excel

● Organize Data: Helps in arranging your data in a logical sequence, making it easier
to read and interpret.
● Quick Analysis: Sorting allows you to identify trends or outliers in data sets, such as
highest/lowest values, most recent dates, etc.
● Efficient Filtering: It helps group similar data together, making it easier to apply
filters or summaries like pivot tables.
● Data Management: Useful for restructuring large datasets for reports or
presentations.

To sort data in MS Excel while ensuring headers are selected and avoiding specific
columns like S.No (serial number), follow these steps:

Step 1: Ensure Headers Are Selected and Avoid "S.No."

1. Select the range of data you want to sort, excluding the S.No. column (if you don't
want to include it in sorting).
○ You can do this by selecting the specific columns you want to sort. For
example, hold down the Ctrl key and click on the header of each column you
wish to sort while avoiding the "S.No." column.
2. Go to the Data tab and click on Sort.
3. In the Sort dialog box, ensure the "My data has headers" checkbox is selected.
This ensures that Excel recognizes the headers of your data range and avoids
sorting the column headers.

Step 2: Perform Multi-Level Sorting

1. In the Sort dialog box, choose your first sorting level:


○ Under Column, select the column you want to sort by first (e.g., Name or
Date).
○ Choose Sort On (Values, Cell Color, Font Color, etc.).
○ Choose Order (A to Z, Z to A, Smallest to Largest, etc.).
2. Click Add Level to add a second level of sorting:
○ Select your next column to sort by (e.g., Department).
○ Define the sorting order as needed.
3. Add a third level of sorting if necessary:

www.xlcoach.in Mobile@ 80567 63406 [email protected] 9


○ Again, click Add Level and select the third column to sort by (e.g., Amount).
4. Important: Make sure the last level of sorting (the lowest level) is set to a numeric
column to ensure numbers are sorted properly. For example, select the Amount or
Salary column as your final sorting level and set the order as Smallest to Largest or
Largest to Smallest.
5. Once your levels are set, click OK to apply the sorting.

Example

If you have a dataset with columns like S.No., Name, Department, and Salary, and you
want to:

● Exclude S.No.
● Sort by Department (alphabetically)
● Then by Name (alphabetically)
● And finally by Salary (numerically)

You would:

1. Select the columns Name, Department, and Salary (skip S.No.).


2. In the Sort dialog box, add Department as the first level, Name as the second level,
and Salary as the last (numeric) level.

This process ensures accurate sorting based on multiple criteria, while keeping the serial
numbers intact.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 10


Filters in Excel
What is a Filter in Excel?

● Filter in Excel is a feature that allows you to display only the rows that meet
specific criteria while hiding the others.
● It helps to focus on relevant data without deleting or rearranging the data.

Purpose of Using Filters

● Data Analysis: Quickly view subsets of data for specific conditions.


● Decision Making: Focus on key information by filtering out irrelevant data.
● Customization: Filter by specific values, conditions, colors, or icons to meet unique
needs.
● Efficient Navigation: Makes large datasets manageable by allowing selective data
viewing.

Shortcut Keys for Applying Filters

● Ctrl + Shift + L: Toggle filters on or off.


● Alt + Down Arrow: Open the filter dropdown menu in a selected column.
● Alt + D + F + F: Another way to turn on/off filters.

Types of Filters in Excel

1. Number Filter
○ Filters numeric data based on conditions like greater than, less than, equal
to, etc.
○ Example: Filter salaries greater than 50,000.
2. Text Filter
○ Filters text data based on conditions like begins with, contains, equals, etc.
○ Example: Filter all names that begin with "A."
3. Date Filter
○ Filters date-based data using conditions like before, after, between, or
specific periods (Today, This Month).
○ Example: Filter dates from January to March.
4. Color Filter
○ Filters cells based on cell color, font color, or conditional formatting.
○ Example: Filter all rows with red-colored cells.
5. Custom Filter
○ Allows you to apply more complex filtering criteria by combining multiple
conditions.
○ Example: Filter for data where Salary > 50,000 and Department = HR.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 11


Steps to Create a Slicer for Filtering

1. Ensure Data is in a Table:


○ First, make sure your data is in an Excel Table. You can do this by selecting
your range and pressing Ctrl + T to convert it into a table.
2. Insert a Slicer:
○ Go to the Insert tab and click on Slicer.
○ Select the column(s) you want to filter using the slicer.
3. Use the Slicer:
○ Once inserted, the slicer will appear as a visual filter.
○ Click on any button in the slicer to filter the data based on that category (e.g.,
filter by department or year).
4. Multi-Select:
○ Hold Ctrl while selecting multiple slicer buttons to filter for more than one
item.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 12


Formulas and Functions in Excel
BODMAS (Order of Operations)

BODMAS is an acronym used to remember the order of operations in mathematics, ensuring


calculations are performed correctly. The order of operations is as follows:

1. B - Brackets (Parentheses)
2. O - Orders (Exponents, including roots)
3. D - Division
4. M - Multiplication
5. A - Addition
6. S - Subtraction

When performing calculations, operations within brackets are completed first, followed by
exponents, then division and multiplication (from left to right), and finally addition and
subtraction (from left to right).

Example: Let's solve the expression 2+8×2^2/5−2 by step using the BODMAS rule.

Expression: 2+8×2^2/5−2

1. Brackets (B): There are no brackets in this expression, so we move to the next step.
2. Orders (O): Evaluate the exponentiation first.

2+8×2^2/5−2 this will become 2+8×4/5−2


3. Division and Multiplication (DM): Perform these operations from left to right.
○ 2+32/5−2
First, perform the multiplication:
○ Next, perform the division: 2 + 6.4 - 2
4. Addition and Subtraction (AS): Perform these operations from left to right.
○ First, perform the addition: 8.4−2
○ Next, perform the subtraction: 6.46
○ Final Result : 6.4

Functions and Formulas

Formulas:

● Formulas are expressions used to perform calculations or other operations on data in


your Excel worksheet.
● A formula always starts with an equals sign (=).
● Example: =A1 + B1 adds the values in cells A1 and B1.

Functions:

● Functions are predefined formulas that perform specific calculations using the data
you provide.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 13


● Functions simplify complex calculations and improve efficiency.
● Example: =SUM(A1:A10) adds all the values from cell A1 to A10.

Syntax of Functions

● The general syntax for a function is: =FUNCTION_NAME(argument1, argument2, ...)


● Example: =AVERAGE(B1:B10) calculates the average of values in the range B1 to
B10.

Frequently Used Functions with Syntax

1. SUM: Adds all the numbers in a range of cells.


○ Syntax: =SUM(number1, [number2], ...)
○ Example: =SUM(A1:A10)
2. AVERAGE: Calculates the average (arithmetic mean) of a group of numbers.
○ Syntax: =AVERAGE(number1, [number2], ...)
○ Example: =AVERAGE(B1:B10)
3. COUNT: Counts the number of cells that contain numbers.
○ Syntax: =COUNT(value1, [value2], ...)
○ Example: =COUNT(C1:C10)
4. MAX: Returns the largest value in a set of values.
○ Syntax: =MAX(number1, [number2], ...)
○ Example: =MAX(D1:D10)
5. MIN: Returns the smallest value in a set of values.
○ Syntax: =MIN(number1, [number2], ...)
○ Example: =MIN(E1:E10)
6. IF: Checks whether a condition is met, and returns one value if true, and another
value if false.
○ Syntax: =IF(logical_test, value_if_true, value_if_false)
○ Example: =IF(F1>50, "Pass", "Fail")
7. VLOOKUP: Looks for a value in the leftmost column of a table and returns a value in
the same row from a specified column.
○ Syntax: =VLOOKUP(lookup_value, table_array, col_index_num,
[range_lookup])
○ Example: =VLOOKUP(G1, A1:D10, 2, FALSE)
8. HLOOKUP: Searches for a value in the top row of a table and returns a value in the
same column from a specified row.
○ Syntax: =HLOOKUP(lookup_value, table_array, row_index_num,
[range_lookup])
○ Example: =HLOOKUP(H1, A1:D10, 3, FALSE)
9. INDEX: Returns the value of a cell in a specified row and column within a range.
○ Syntax: =INDEX(array, row_num, [column_num])
○ Example: =INDEX(A1:C10, 2, 3)
10. MATCH: Searches for a specified item in a range of cells and returns the relative
position of that item.
○ Syntax: =MATCH(lookup_value, lookup_array, [match_type])
○ Example: =MATCH(I1, B1:B10, 0)

www.xlcoach.in Mobile@ 80567 63406 [email protected] 14


11. CONCATENATE (or CONCAT in newer versions): Joins several text strings into one
string.
○ Syntax: =CONCATENATE(text1, [text2], ...) or =CONCAT(text1, [text2], ...)
○ Example: =CONCATENATE("Hello, ", "World!")
12. LEFT: Returns the specified number of characters from the start of a text string.
○ Syntax: =LEFT(text, [num_chars])
○ Example: =LEFT("Excel", 2)
13. RIGHT: Returns the specified number of characters from the end of a text string.
○ Syntax: =RIGHT(text, [num_chars])
○ Example: =RIGHT("Excel", 2)
14. MID: Returns a specific number of characters from a text string, starting at the
position you specify.
○ Syntax: =MID(text, start_num, num_chars)
○ Example: =MID("Excel", 2, 3)
15. LEN: Returns the number of characters in a text string.
○ Syntax: =LEN(text)
○ Example: =LEN("Excel")
16. TRIM: Removes all spaces from a text string except for single spaces between
words.
○ Syntax: =TRIM(text)
○ Example: =TRIM(" Hello World! ")
17. UPPER: Convert all in Uppercase
○ Syntax: =UPPER(text)
○ Example: =UPPER(" Hello World! ")
18. LOWER: Convert all in Lowercase
○ Syntax: =LOWER(text)
○ Example: =LOWER(" Hello World! ")
19. PROPER: Convert all first letter in Capital letters
○ Syntax: =PROPER(text)
○ Example: =PROPER(" Hello World! ")
20. SUMIF: Adds the cells specified by a given condition or criteria.
○ Syntax: =SUMIF(range, criteria, [sum_range])
○ Example: =SUMIF(A1:A10, ">50", B1:B10)
21. SUMIFS: Adds the cells specified by multiple conditions or criteria.
○ Syntax: =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2,
criteria2], ...)
○ Example: =SUMIFS(B1:B10, A1:A10, ">50", C1:C10, "Red")
22. COUNTIF: Counts the number of cells that meet a condition or criteria.
○ Syntax: =COUNTIF(range, criteria)
○ Example: =COUNTIF(A1:A10, ">=50")
23. COUNTIFS: Counts the number of cells that meet multiple conditions or criteria.
○ Syntax: =COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)
○ Example: =COUNTIFS(A1:A10, ">=50", B1:B10, "Blue")

www.xlcoach.in Mobile@ 80567 63406 [email protected] 15


1. Combining Functions:
○ You can nest functions within each other for more complex calculations.
○ Example: =SUM(A1:A10) + MAX(B1:B10)
2. Referencing Cells:
○ Functions can reference other cells or ranges in your worksheet.
○ Example: =IF(A1>10, "High", "Low")
3. Relative and Absolute References:
○ Relative Reference: Changes when the formula is copied to another cell.
Example: A1
○ Absolute Reference: Remains constant regardless of where the formula is
copied. Example: $A$1

Practice Problems

1. Calculate the total sales for the range B2:B10 using the SUM function.
○ =SUM(B2:B10)
2. Find the highest score in the range C2:C15 using the MAX function.
○ =MAX(C2:C15)
3. Check if the value in cell D1 is greater than 100 using the IF function.
○ =IF(D1>100, "Above 100", "Below 100")
4. Concatenate the first name in E1 and the last name in F1 with a space in between.
○ =CONCATENATE(E1, " ", F1)
5. Sum the values in B1:B10 if the corresponding value in A1:A10 is greater than 50.
○ =SUMIF(A1:A10, ">50", B1:B10)
6. Count the number of cells in the range A1:A10 that are greater than or equal to 50.
○ =COUNTIF(A1:A10, ">=50")
7. Sum the values in B1:B10 where the corresponding value in A1:A10 is greater than
50 and the corresponding value in C1:C10 is "Red".
○ =SUMIFS(B1:B10, A1:A10, ">50", C1:C10, "Red")
8. Count the number of cells in A1:A10 that are greater than or equal to 50 and have
the value "Blue" in the corresponding cell in B1:B10.
○ =COUNTIFS(A1:A10, ">=50", B1:B10, "Blue")

By understanding and practising these functions and formulas, you can effectively perform a
wide range of calculations and data analysis tasks in Excel.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 16


Subtotal and Aggregate Function
Introduction to Subtotal Function

Title: Subtotal Function – Purpose and Syntax

● Purpose:
○ The SUBTOTAL function returns the subtotal of a list or database.
○ It allows performing various mathematical operations like SUM, AVERAGE,
COUNT, etc., and is useful when filtering data, as it only considers visible
cells.

Syntax:
SUBTOTAL(function_num, range)

○ function_num: A number that specifies the type of subtotal (e.g., 1 =


AVERAGE, 9 = SUM, 3 = COUNTA).
○ range: The range of cells you want the subtotal for.

Subtotal Function Example

Title: Subtotal Function – Example

● Example:
○ Let’s say you have data in cells A1
and want to calculate the sum.

Formula: SUBTOTAL(9, A1:A10)

○ Explanation:
■ The 9 represents the SUM function.
■ The result will be the sum of all visible cells in A1
.
● Key Benefit:
○ When you filter the data, the subtotal automatically updates to reflect only
visible cells.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 17


Aggregate Function – Purpose and Syntax

● Purpose:
○ The AGGREGATE function performs multiple operations on a list or database
while offering more options than SUBTOTAL, such as ignoring errors, hidden
rows, etc.

Syntax:
AGGREGATE(function_num, options, range)

○ function_num: Specifies the type of operation (e.g., 1 = AVERAGE, 9 =


SUM, 4 = MAX).
○ options: A number that specifies how to handle errors, hidden rows, etc.
○ range: The range of cells to perform the operation on.

Aggregate Function – Example

● Example: To sum cells A1, ignoring errors:

AGGREGATE(9, 6, A1:A10)
○ Explanation:
■ 9 means the SUM operation.
■ 6 means ignore errors.
■ This function provides flexibility by allowing you to specify how to
handle hidden rows or errors.
● Key Benefit:
○ More versatile than SUBTOTAL as it allows operations to ignore hidden rows,
errors, and nested subtotals.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 18


Date Functions in Excel
How to Enter Date and Time in Excel

● Entering Date:
○ To enter a date, use the format DD/MM/YYYY or MM/DD/YYYY, depending
on your regional settings.
○ Example: 01/01/2024
● Entering Time:
○ Time is entered using the format HH
AM/PM or HH
for 24-hour format.
○ Example: 10:30 AM or 14:30
● Shortcuts:
○ Current Date: Ctrl + ;
○ Current Time: Ctrl + Shift + ;

TODAY Function

● Purpose: The TODAY function returns the current date.


● Syntax: =TODAY()
● Example: =TODAY()
○ Explanation: This function will return today’s date.

DATE Function

● Purpose: The DATE function returns a date from individual year, month, and day
inputs.
● Syntax: =DATE(year, month, day)
● Example: =DATE(2024, 1, 1)
○ Explanation: This will return the date 01/01/2024.

EDATE Function

● Purpose: The EDATE function returns the date that is a specified number of months
before or after a start date.
● Syntax: =EDATE(start_date, months)
● Example: =EDATE(TODAY(), 3)
○ Explanation: This returns the date three months from today’s date.

EOMONTH Function

● Purpose: The EOMONTH function returns the last day of the month that is a
specified number of months before or after a start date.
● Syntax: =EOMONTH(start_date, months)
● Example: =EOMONTH(TODAY(), 1)
○ Explanation: This will return the last day of the next month from today.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 19


NETWORKDAYS Function

● Purpose: The NETWORKDAYS function calculates the number of working days


between two dates, excluding weekends and holidays.
● Syntax: =NETWORKDAYS(start_date, end_date, [holidays])
● Example: =NETWORKDAYS("01/01/2024", "01/31/2024")
○ Explanation: This returns the number of working days in January 2024.

NETWORKDAYS.INTL Function

● Purpose: The NETWORKDAYS.INTL function calculates the number of working


days between two dates, allowing you to specify which days are weekends.
● Syntax: =NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
● Example: =NETWORKDAYS.INTL("01/01/2024", "01/31/2024", 7)
○ Explanation: This calculates the working days between two dates, assuming
Sunday is the only weekend day.

DATEDIF Function

● Purpose: The DATEDIF function calculates the difference between two dates in
years, months, or days.
● Syntax: =DATEDIF(start_date, end_date, unit)
● Units:
○ "Y": Years
○ "M": Months
○ "D": Days
● Example: =DATEDIF("01/01/2020", "01/01/2024", "Y")
○ Explanation: This calculates the number of full years between January 1,
2020, and January 1, 2024.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 20


Conditional Formatting
Introduction to Conditional Formatting

Title: Conditional Formatting – Purpose and Overview

● Purpose:
○ Conditional Formatting in Excel allows you to format cells based on specific
conditions, making it easier to spot trends, patterns, and anomalies in data
visually.
● Usage Scenario:
○ A sales manager may use conditional formatting to highlight sales figures
that exceed a certain target, helping quickly identify top performers.
● Key Options Covered:
○ Greater Than, Less Than, Between
○ Text That Contains
○ Date Occurrence
○ Duplicate Values
○ Equal To

Highlight Cells Greater Than

Title: Conditional Formatting – Greater Than

● Purpose:
○ Highlights cells with values greater than a specified number.
● Usage Scenario:
○ Sales Performance: Highlight sales figures greater than $10,000 to identify
top sales easily.
● How To:
○ Select the range of cells.
○ Go to Home > Conditional Formatting > Highlight Cells Rules > Greater
Than.
○ Enter the value and select the formatting style.
● Example:
○ Highlight values greater than 500 to identify outliers in product sales.

Highlight Cells Less Than

Title: Conditional Formatting – Less Than

● Purpose:
○ Highlights cells with values less than a specified number.
● Usage Scenario:
○ Inventory Management: Identify products with stock levels lower than 50 for
restocking.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 21


● How To:
○ Select the cells.
○ Go to Home > Conditional Formatting > Highlight Cells Rules > Less
Than.
○ Enter the value and choose the formatting style.
● Example:
○ Highlight values less than 20 to find low stock items.

Highlight Cells Between

Title: Conditional Formatting – Between

● Purpose:
○ Highlights cells with values between two specified numbers.
● Usage Scenario:
○ Grading System: Highlight scores between 70 and 90 to identify students
who are doing well but could improve.
● How To:
○ Select the range.
○ Go to Home > Conditional Formatting > Highlight Cells Rules > Between.
○ Enter the two values and set the formatting style.
● Example:
○ Highlight sales figures between $5,000 and $10,000.

Highlight Cells Containing Specific Text

Title: Conditional Formatting – Text That Contains

● Purpose:
○ Highlights cells that contain specific text strings.
● Usage Scenario:
○ Customer Feedback: Highlight feedback containing the word “issue” to
quickly identify negative feedback.
● How To:
○ Select the range.
○ Go to Home > Conditional Formatting > Highlight Cells Rules > Text That
Contains.
○ Enter the specific text and set the formatting.
● Example:
○ Highlight cells containing the word "urgent" in a task list.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 22


Highlight Cells with Date Occurrence

Title: Conditional Formatting – Date Occurrence

● Purpose:
○ Highlights cells with dates matching a specified condition like today, last
week, next month, etc.
● Usage Scenario:
○ Project Management: Highlight tasks that are overdue by comparing due
dates with today's date.
● How To:
○ Select the date range.
○ Go to Home > Conditional Formatting > Highlight Cells Rules > A Date
Occurring.
○ Choose the date condition (e.g., Today, Last Week) and set the formatting.
● Example:
○ Highlight deadlines that are due today.

Highlight Duplicate Values

Title: Conditional Formatting – Duplicate Values

● Purpose:
○ Highlights duplicate entries in a selected range.
● Usage Scenario:
○ Data Cleaning: Identify duplicate entries in a customer database to ensure
data integrity.
● How To:
○ Select the data range.
○ Go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate
Values.
○ Set the format to highlight duplicates.
● Example:
○ Highlight duplicate customer IDs in a list.

Highlight Cells Equal To

Title: Conditional Formatting – Equal To

● Purpose:
○ Highlights cells that are equal to a specific number or text.
● Usage Scenario:
○ Budgeting: Highlight expenses equal to exactly $1,000 to check for certain
fixed costs.
● How To:
○ Select the range.
○ Go to Home > Conditional Formatting > Highlight Cells Rules > Equal To.
○ Enter the specific value and set the formatting.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 23


Understanding Cell References in Excel
When working with formulas in Excel, cell references are used to refer to specific cells or
ranges of cells. There are three types of cell references:

1. Relative References: Change when a formula is copied to another cell.


○ Example: A1
2. Absolute References: Remain constant, regardless of where the formula is copied.
○ Example: $A$1
3. Mixed References: A combination of relative and absolute references.
○ Example: $A1 (column is absolute, row is relative) or A$1 (column is relative,
row is absolute)

Absolute References

Absolute references are particularly useful when you want a specific cell reference to stay
fixed, no matter where the formula is copied. This is done by adding dollar signs ($) before
the column letter and row number.

Syntax: $Column$Row

Example: $A$1

Why Use Absolute References?

● Consistency: Ensure that a formula always refers to the same cell, even when
copied to different locations.
● Data Integrity: Maintain reference to a fixed value or range, such as a tax rate,
constant, or lookup table.
● Efficiency: Simplify complex formulas that require consistent references across a
worksheet.

How to Create an Absolute Reference

To create an absolute reference:

1. Click on the cell where you want to enter the formula.


2. Type = to start the formula.
3. Click on the cell you want to reference, or type the cell address.
4. Press F4 to toggle between reference types until you reach the absolute reference
($A$1).

www.xlcoach.in Mobile@ 80567 63406 [email protected] 24


Goal Seek
Goal Seek in Excel is a built-in tool that allows you to find the input value needed to achieve
a specific goal or result. Here’s how you can use it:

1. Select the Cell with the Formula:


○ Click on the cell that contains the formula you want to solve for.
2. Open Goal Seek:
○ Go to the Data tab on the Ribbon.
○ In the Forecast group, click on What-If Analysis.
○ Select Goal Seek from the drop-down menu.
3. Set Up Goal Seek:
○ In the Goal Seek dialog box, you'll see three fields:
■ Set cell: This should already be filled with the reference to the cell
containing the formula (the cell you selected in step 2).
■ To value: Enter the desired result you want to achieve.
■ By changing cell: Enter the reference to the cell that you want to
adjust to achieve the desired result.
4. Run Goal Seek:
○ Click OK. Excel will iterate through possible values to find the input that
brings the formula result close to your desired value.
○ If Goal Seek successfully finds a solution, it will display a message box saying
that Goal Seek has found a solution. Click OK to accept the solution, or click
Cancel to revert to the original value.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 25


LOOKUP Function- VLOOKUP, HLOOKUP & XLOOKUP
1. LOOKUP Function

The LOOKUP function searches for a value in one range and returns a value from the same
position in another range.

Syntax:

=LOOKUP(lookup_value, lookup_vector, [result_vector])

Steps:

1. Identify the lookup_value (the value you want to search for).


2. Specify the lookup_vector (range containing the search values).
3. Define the result_vector (range from which the value is returned).

2. INDEX Function

The INDEX function returns the value of a cell at a specific row and column in a range.

Syntax:

=INDEX(array, row_num, [column_num])

Steps:

1. Identify the array (range of cells).


2. Define the row_num and column_num to pinpoint the cell.

3. MATCH Function

The MATCH function returns the relative position of a value in a range.

Syntax:

=MATCH(lookup_value, lookup_array, [match_type])

Steps:

1. Define the lookup_value to find.


2. Specify the lookup_array (range of cells).
3. Choose the match_type (0 for an exact match).

www.xlcoach.in Mobile@ 80567 63406 [email protected] 26


4. VLOOKUP Function

The VLOOKUP function searches for a value in the first column of a range and returns a
value in the same row from another column.

Syntax:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Steps:

1. Identify the lookup_value.


2. Specify the table_array (range of data).
3. Define the col_index_num (column number of the result).
4. Choose TRUE for approximate match or FALSE for exact match.

5. HLOOKUP Function

The HLOOKUP function searches for a value in the first row of a range and returns a value
in the same column from another row.

Syntax:

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

Steps:

1. Define the lookup_value.


2. Specify the table_array (range of data).
3. Define the row_index_num (row number of the result).
4. Choose TRUE for approximate match or FALSE for exact match.

6. XLOOKUP Function

The XLOOKUP function searches a range or array for a value and returns a value
corresponding to it.

Syntax:

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode],


[search_mode])

Steps:

1. Define the lookup_value.


2. Specify the lookup_array and return_array.
3. Optionally specify if_not_found, match_mode, or search_mode.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 27


Pivot Tables in Excel
Introduction to Pivot Tables

Pivot tables are powerful tools in Excel used to summarize, analyze, and present large
amounts of data in a concise, tabular format. They allow users to quickly rearrange, group,
and aggregate data to extract meaningful insights.

Benefits of Pivot Tables

● Summarization: Easily summarize data by categories without complex formulas.


● Flexibility: Quickly change the layout and arrangement of data fields.
● Aggregation: Perform calculations (like sum, average, count) on the data.
● Visualization: Create pivot charts to visualize trends and patterns.

📌 Step-by-Step Guide to Creating Pivot Tables:


1. Select Your Data Range:
○ Click anywhere within your dataset to activate it.
2. Insert a Pivot Table:
○ Go to the Insert tab on the ribbon.
○ Click on PivotTable.
○ Choose where you want the PivotTable to be placed (new worksheet or
existing one) and click OK.
3. Set Up the Pivot Table:
○ In the PivotTable Fields pane, drag and drop fields into Rows, Columns,
Values, and Filters areas as needed.
4. Switch to Classic PivotTable Layout:
○ Right-click on the PivotTable and select PivotTable Options.
○ Under the Display tab, check the box for Classic PivotTable layout
(enables dragging of fields in the grid).
○ Click OK.
5. Collapse Rows:
○ Click on the minus (-) signs next to the row labels to collapse and summarize
data.

🧮 Creating Calculated Columns:


● Steps:
○ Click anywhere inside the PivotTable.
○ Go to the PivotTable Analyze (or Options) tab.
○ Click on Fields, Items & Sets and choose Calculated Field.
○ In the Name box, type the name of your new calculated field.
○ In the Formula box, enter your calculation using the fields from your data.
○ Click Add, then OK.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 28


● Difference Between Calculated Columns and Calculated Items:
○ Calculated Columns:
■ Add a new field to your PivotTable based on a calculation of other
fields.
■ The formula is applied to each row individually.
○ Calculated Items:
■ Create a new item within an existing field.
■ Calculations are based on items within the same field, allowing for
custom grouping and analysis.

Advanced Pivot Table Features

● Grouping: Group dates, numbers, or text fields within the pivot table.
● Calculated Fields: Create new fields based on calculations within the pivot table.
● Slicers: Add interactive slicers to filter data visually.
● Pivot Charts: Create charts directly from pivot tables to visualize trends.

Best Practices

● Keep Data Clean: Ensure consistent data formatting and avoid empty rows or
columns.
● Use Descriptive Headers: Clear and descriptive column headers help in easy field
selection.
● Experiment: Pivot tables are flexible; experiment with different field placements and
settings to find the best view for your data.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 29


Data Validation
Creating a Dropdown Using Data Validation (Typed Options)

Steps to Create a Dropdown (by Typing Options):

1. Select the Cell: Choose the cell where you want the dropdown list.
2. Open Data Validation:
○ Go to the Data tab.
○ Click on Data Validation in the Data Tools group.
3. Choose List:
○ In the Data Validation dialog box, under the Settings tab, select List in the
Allow dropdown.
4. Enter Options:
○ In the Source box, type the options separated by commas (e.g., “Yes, No,
Maybe”).
5. Apply and Finish:
○ Click OK. Your dropdown is now set up with the typed options.

Creating a Dropdown Using Data Validation (From Range)

Steps to Create a Dropdown (Selecting from Range):

1. Select the Cell: Choose the cell where you want the dropdown.
2. Open Data Validation:
○ Go to the Data tab.
○ Click on Data Validation in the Data Tools group.
3. Choose List:
○ In the Data Validation dialog box, select List from the Allow dropdown.
4. Select Range:
○ Click inside the Source box and select the range of cells containing your list
options (e.g., A2:A5).
5. Apply:
○ Click OK. The dropdown list will now display the values from the selected
range.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 30


Using INDIRECT Function for Dependent Dropdowns

Steps to Create Dependent Dropdowns Using INDIRECT:

1. Prepare Your Lists:


○ Create multiple lists for different categories in separate columns. Name each
list using Named Ranges (e.g., name the range of fruits "Fruits" and
vegetables "Vegetables").
2. Create the First Dropdown:
○ Select a cell for the first dropdown (e.g., a category like Fruits or Vegetables).
○ Go to Data Validation → Allow → List and type your category options (e.g.,
“Fruits, Vegetables”).
3. Create the Dependent Dropdown:
○ Select the next cell where the dependent dropdown will appear.
○ In the Data Validation dialog, choose List.
○ In the Source box, type: =INDIRECT(A1) where A1 is the first dropdown’s cell
reference.
4. Result:
○ When you select a category in the first dropdown (e.g., "Fruits"), the second
dropdown will display options from the corresponding list.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 31


Protecting Cells & Hiding Formulas
Steps to Protect Cells:

1. Select the Cells to Lock:


○ Right-click the selected cells and choose Format Cells.
○ Go to the Protection tab and check Locked.
2. Protect the Worksheet:
○ Go to the Review tab and click Protect Sheet.
○ Set a password to prevent editing of the protected cells.

Steps to Hide Formulas:

1. Select the Cells with Formulas:


○ Right-click the selected cells, choose Format Cells, and go to the Protection
tab.
○ Check Hidden.
2. Protect the Worksheet:
○ Go to the Review tab and click Protect Sheet.
○ The formulas will not be visible in the formula bar.

Protecting Workbook with Password

Steps to Protect Workbook with Password to Open/Modify:

1. Go to File Menu:
○ Click File → Save As.
2. Set Password:
○ In the Save As dialog, click Tools and choose General Options.
○ Enter passwords in the "Password to open" and/or "Password to modify"
boxes.
3. Save:
○ Click OK and save the workbook.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 32


Macro in Excel
Creating a Macro Using VBA Editor (Alt + F11)

Steps to Create a Macro by Copying VB Code:

1. Open the VBA Editor:


○ Press Alt + F11 to open the VBA Editor.
2. Insert a Module:
○ In the VBA Editor, go to Insert → Module.
3. Paste the Code:
○ In the module window, paste your VBA code.
4. Save and Run the Macro:
○ Close the VBA Editor (Alt + Q).
○ Go to the Developer tab, click Macros, select your macro, and click Run.

Saving a Workbook as Macro-Enabled

Steps to Save a Workbook as Macro-Enabled:

1. Go to File Menu:
○ Click File → Save As.
2. Choose Macro-Enabled Format:
○ In the Save As Type dropdown, choose Excel Macro-Enabled Workbook
(*.xlsm).
3. Save:
○ Name your file and click Save.

VBA Function to Check if a Cell is Underlined(macro Coding)

Function IsCellUnderlined(cell As Range) As Boolean


'Check if the cell contains underlined text
If cell.Font.Underline <> xlUnderlineStyleNone Then
IsCellUnderlined = True
Else
IsCellUnderlined = False
End If
End Function

www.xlcoach.in Mobile@ 80567 63406 [email protected] 33


VBA to create Index Page

Sub CreateIndexPage()

Dim ws As Worksheet

Dim indexSheet As Worksheet

Dim sheetCounter As Integer

Dim i As Integer

' Check if the Index sheet already exists, and delete if it does

On Error Resume Next

Set indexSheet = ThisWorkbook.Sheets("Index")

Application.DisplayAlerts = False

If Not indexSheet Is Nothing Then indexSheet.Delete

Application.DisplayAlerts = True

On Error GoTo 0

' Add a new worksheet for the Index

Set indexSheet = ThisWorkbook.Sheets.Add

indexSheet.Name = "Index"

' Set up the header for the index page

With indexSheet

.Range("A1").Value = "Sheet Index"

.Range("A1").Font.Bold = True

.Range("A1").Font.Size = 14

.Columns("A:A").ColumnWidth = 30

End With

' Loop through all sheets and create a list of sheet names with hyperlinks

www.xlcoach.in Mobile@ 80567 63406 [email protected] 34


i = 2 ' Start from row 2

For Each ws In ThisWorkbook.Sheets

If ws.Name <> "Index" Then

' Add the sheet name and create a hyperlink to the sheet

indexSheet.Cells(i, 1).Value = ws.Name

indexSheet.Hyperlinks.Add Anchor:=indexSheet.Cells(i, 1), Address:="",


SubAddress:="'" & ws.Name & "'!A1", TextToDisplay:=ws.Name

i=i+1

End If

Next ws

' Activate the Index sheet after creation

indexSheet.Activate

End Sub

www.xlcoach.in Mobile@ 80567 63406 [email protected] 35


VBA to combine multiple workbooks

Sub GetSheets()
Path = ""

Filename = Dir(Path & "*.xls")

Do While Filename <> ""

Workbooks.Open Filename:=Path & Filename, ReadOnly:=True

For Each Sheet In ActiveWorkbook.Sheets

Sheet.Copy After:=ThisWorkbook.Sheets(1)

Next Sheet

Workbooks(Filename).Close

Filename = Dir()

Loop

End sub

Note:

Step 1: Put the files in one folder

Step2: Open a new excel workbook

Step3: Alt Fn F11

Step4: Paste the above VB code in Module

Step5: copy the folder path and paste in 2nd line where Path=” “ Put \ backslash at the end
of path

Step 6: Run macro

www.xlcoach.in Mobile@ 80567 63406 [email protected] 36


Power Query
What is Power Query in Excel?

Power Query is a data transformation and connection tool available in Excel. It allows you to
import, clean, and transform data from various sources such as Excel, databases, web
pages, and other file types. Power Query helps automate data preparation tasks, making it
easier to clean and reshape data without manual editing, allowing for more efficient data
analysis.

Key Uses of Power Query in Excel:

1. Data Importing: Power Query can pull data from various external sources (Excel,
CSV, databases, web, etc.) into Excel for further analysis.
2. Data Transformation: It provides a suite of tools to clean, reshape, and transform
the data without manually editing in Excel cells.
3. Automation: Power Query allows you to set up repeatable processes for data
transformation. Once the steps are defined, you can refresh the data anytime, and
the same transformations will be applied automatically.
4. Data Merging and Combining: You can combine multiple tables or datasets (e.g.,
combining several Excel sheets into one dataset).
5. Data Filtering: Remove irrelevant data, filter rows, and columns to focus on what’s
important.
6. Data Restructuring: Pivot or unpivot data to restructure it as needed.

Power Query Window Navigation

Once you've imported data and clicked on "Transform Data," the Power Query Editor window
opens. Below are the main components of the Power Query interface:

1. Ribbon: The top menu contains tabs like Home, Transform, Add Column, View, and
Help. Each tab contains transformation tools, from data source management to
adding calculated columns.
2. Queries Pane (Left Panel): This panel lists all queries you have loaded. A query
represents a set of transformations applied to data. You can work on multiple queries
simultaneously.
3. Data Preview (Center): This area shows a sample of your data as you apply
transformations. It is not the final dataset but a preview based on the current
transformation steps.
4. Applied Steps (Right Panel): This panel records all transformation steps applied to
your query. You can click on any step to view or modify it, or even delete steps.
5. Formula Bar: This shows the M-code (Power Query's scripting language) for the
currently selected transformation. You can manually edit the M-code to customize
transformations.
6. Status Bar: Shows the number of rows and columns loaded in the query.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 37


Power Query Transformations Overview

In Power Query, transformations are operations applied to data to clean, reshape, or


enhance it. Below are some key transformation categories:

1. Text Functions:

Power Query provides various functions to transform text data.

● Trim: Removes any leading or trailing spaces in a text column.


● Lowercase/Uppercase: Changes the text to all lower or uppercase.
● Split Column by Delimiter: Splits a column into multiple columns based on a
delimiter (e.g., separating a full name into first and last names).
● Replace Values: Replaces specific text values with others.
● Concatenate: Joins multiple text columns into one.
● Extract: Allows you to extract a part of the text such as the first characters, last
characters, or characters between delimiters.

2. Date Functions:

Power Query offers powerful transformations for date and time data.

● Date Parts: Extract parts of a date like year, month, day, quarter, week, etc.
● Add/Subtract Dates: Add or subtract days, months, or years from a date.
● Date Differences: Calculate the difference between two dates.
● Convert to Date: Transform data into date format.
● Extract Time: If working with a date-time format, you can extract the time portion
(hour, minute, second).

3. Number Functions:

Power Query also has various transformations for numerical data.

● Round: Rounds numbers to a specified number of decimal places.


● Add/Subtract/Multiply/Divide: Perform basic arithmetic on columns.
● Percentage: Converts a number to a percentage or calculates percentage
differences.
● Sum: Calculate the total sum of a column.
● Standard Deviation/Variance: Calculate statistical measures like variance and
standard deviation.

4. Conditional Transformations:

You can create new columns based on conditions.

● If...Then...Else: Use conditional logic to create new columns or modify existing ones
based on criteria. For example, if sales > 1000, label as "High," otherwise "Low."

www.xlcoach.in Mobile@ 80567 63406 [email protected] 38


● Custom Column: Allows you to create a new column by writing custom M-code logic
for specific transformations.

5. Column Transformations:

Power Query allows various transformations to reshape columns.

● Pivot: Transforms rows into columns, allowing you to aggregate data more easily.
● Unpivot: Converts columns into rows, useful when you need to normalize wide
datasets.
● Merge Columns: Combine two or more columns into one.
● Split Columns: Split one column into multiple columns based on a delimiter or
specific number of characters.

6. Combining Data:

Power Query allows you to combine datasets.

● Append Queries: Stack datasets from multiple tables or sheets one after another.
● Merge Queries: Join two datasets on a common column, much like a SQL join.

The general steps to combine multiple sheets using Power Query in Excel:

1. Open Excel and Power Query: Launch Excel and go to the "Data" tab. Click on "Get
Data" > "From File" > "From Workbook" to import data from an Excel file.
2. Select the Excel File: Choose the workbook that contains the sheets you want to
combine and click "Import."
3. Preview Navigator: In the Navigator window, select one of the sheets you want to
combine (you will later combine all the necessary sheets). Then click "Transform
Data" to open Power Query Editor.
4. Keep Only the Source Step: In the "Applied Steps" pane, make sure to keep the
"Source" step and remove other steps like "Navigation" to retain flexibility for
combining multiple sheets.
5. Filter for Sheets: In the Power Query Editor, find the "Kind" column (it shows the
type of content, such as table, sheet, etc.). Filter the data to display only "Sheet" or
"Table" entries, depending on your need.
6. Select Necessary Columns: Hold down "Ctrl" and select only the columns with the
sheet names and data you want to extract (typically "Name" and "Data"). Then
right-click and choose "Remove Other Columns" to focus on these two columns.
7. Expand Data: In the "Data" column, click the expand icon (the two arrows). In the
expansion dialog box, uncheck "Use original column name as prefix," then click "OK"
to load the data from the selected sheets.
8. Use First Row as Headers: In the "Transform" tab, click "Use First Row as Headers"
to set the first row of your combined data as the column headers.
9. Rename Columns: Rename any columns as necessary to ensure consistency
across the combined sheets.
10. Remove Unwanted Columns: If there are any unnecessary columns, select them
and use "Remove Columns" to eliminate them.

www.xlcoach.in Mobile@ 80567 63406 [email protected] 39


11. Change Data Types: Ensure each column has the correct data type by selecting the
column and setting its data type (e.g., "Whole Number" for numerical data).
12. Close and Load: Once the data is ready, go to the "Home" tab in Power Query
Editor and click "Close & Load" to return the combined data to Excel.

Steps to Combine Multiple Excel Files Using Power Query

1. Open a New Excel File:


○ Start by opening a new or existing Excel workbook where you want to
combine data.
2. Get Data from Files:
○ Go to the Data tab.
○ Select Get Data → From File → From Folder.
○ Browse and select the folder containing the Excel files you want to combine.
3. Click on Transform Data:
○ After loading the folder content, click on Transform Data to open the Power
Query Editor.
4. Keep Only Name and Content Columns:
○ In the Power Query Editor, you’ll see several columns, including Name and
Content.
○ Select the Name and Content columns.
○ Right-click and select Remove Other Columns to only keep the Name and
Content columns.
5. Add a Custom Column:
○ Go to the Add Column tab, and click on Custom Column.
○ In the custom column window, type:
=Excel.Workbook([Content])
○ Click OK to apply the custom column.
6. Expand the Custom Column:
○ Click the Expand icon next to the new custom column.
○ In the Expand Table dialog, click Load More to view all columns.
○ Untick the Use Original Column Name as Prefix option, then click OK.
7. Keep Only Name and Data Columns:
○ Select the Name column and the new Data column created from the
expansion.
○ Right-click and choose Remove Other Columns to only keep these two.
8. Expand the Data Column:
○ Click the Expand icon in the Data column.
○ In the Expand Table dialog, click Load More and untick the Use Original
Column Name as Prefix option, then click OK.
9. Move First Row as Headers:
○ Go to the Transform tab.
○ Click on Use First Row as Headers to move the first row of the data to the
header row.
10. Filter and Clean Data:
● Click the Order ID dropdown (or the relevant column's dropdown).

www.xlcoach.in Mobile@ 80567 63406 [email protected] 40


● In the filter options, click Load More, and uncheck any irrelevant or empty data (like
"Order ID").

www.xlcoach.in Mobile@ 80567 63406 [email protected] 41

You might also like