Introduction To Excel
Introduction To Excel
Microsoft Excel is one of the most used software applications of all time.
Hundreds of millions of people around the world use Microsoft Excel. You can
use Excel to enter all sorts of data and perform financial, mathematical or
statistical calculations.
1 Range: A range in Excel is a collection of two or more cells. This chapter
gives an overview of some very important range operations.
2 Formulas and Functions: A formula is an expression which calculates the
value of a cell. Functions are predefined formulas and are already available
in Excel.
Take your Excel skills to the next level! 🚀 You can find related examples and
features on the right side of each chapter. Below you can find a complete
overview.
1. Range
- AutoFill: Use AutoFill in Excel to automatically fill a series of cells. This page
contains many easy to follow AutoFill examples. The sky is the limit!
- Fibonacci Sequence: It's easy to create all sorts of sequences in Excel. For
example, the Fibonacci sequence.
- Custom Lists: If you create a custom list in Excel, you can easily fill a range
with your own list of departments, clients, cities, credit card numbers, etc.
This can save time and reduce errors.
- Hide Columns or Rows: Sometimes it can be useful to hide columns or rows
in Excel. Learn how to hide a column, unhide all columns, hide cells, and
much more.
- Skip Blanks: Use the 'Paste Special Skip Blanks' option and Excel will not
overwrite existing values with blanks. To create a formula that skips blank
cells, use IF and ISBLANK.
- AutoFit: You probably know how to change the width of a column in Excel,
but do you also know how to automatically fit the widest entry in a column?
- Move Columns: To move columns in Excel, use the shift key or use Insert
Cut Cells. You can also change the order of all columns in one magic move.
- ROW function: The ROW function in Excel returns the row number of a
reference. For example, =ROW(C4) returns 4. The ROW function can be quite
useful.
2. Formulas and Functions
- Most Used Functions: Let's check out the 10 most used Excel functions.
Visit our section about functions for detailed explanations and more
awesome functions.
Basics of Excel
This section explains the basics of Excel. Don't miss our sections
on Functions and Data Analysis to discover the real power of Excel!
1 Ribbon: Excel selects the ribbon's Home tab when you open it. Learn how
to use the ribbon.
2 Workbook: A workbook is another word for your Excel file. When you start
Excel, click Blank workbook to create an Excel workbook from scratch.
3 Worksheets: A worksheet is a collection of cells where you keep and
manipulate the data. Each Excel workbook can contain multiple worksheets.
4 Format Cells: When we format cells in Excel, we change the appearance of
a number without changing the number itself.
5 Find & Select: Learn how to use Excel's Find, Replace and Go To Special
feature.
6 Templates: Instead of creating an Excel workbook from scratch, you can
create a workbook based on a template. There are many free templates
available, waiting to be used.
7 Data Validation: Use data validation to make sure that users enter certain
values into a cell.
8 Keyboard Shortcuts: Keyboard shortcuts allow you to do things with your
keyboard instead of your mouse to increase your speed.
9 Print: This chapter teaches you how to print a worksheet and how to
change print settings.
10 Share: Learn how to share Excel data with Word documents and other
files.
11 Protect: Encrypt an Excel file with a password so that it requires a
password to open it.
Take your Excel skills to the next level! 🚀 You can find related examples and
features on the right side of each chapter. Below you can find a complete
overview.
1. Ribbon
- Formula Bar: The formula bar in Excel displays the value or formula of the
active cell. You can use the formula bar to enter or edit formulas.
- Quick Access Toolbar: If you use an Excel command frequently, you can
add it to the Quick Access Toolbar. By default, the Quick Access Toolbar
contains four commands: AutoSave, Save, Undo and Redo.
- Customize the Ribbon: The ribbon in Excel can be customized. You can
easily create your own tab and add commands to it.
- Developer Tab: Turn on the Developer tab in Excel if you want to create a
macro, export and import XML files or insert controls.
- Status Bar: The status bar in Excel can be quite useful. By default, the
status bar at the bottom of the window displays the average, count and sum
of selected cells.
- Checkbox: Inserting a checkbox in Excel is easy. For example, use
checkboxes to create a checklist or a dynamic chart.
2. Workbook
- Themes: Excel offers themes to change the look of your workbook with the
click of a button. Each theme consists of 12 colors, two fonts (Headings and
Body) and effects for shapes and SmartArt.
- Cell Styles: Quickly format a cell by choosing a cell style. You can also
create your own cell style in Excel.
- Wrap Text: Wrap text in Excel if you want to display long text on multiple
lines in a single cell.
- Merge Cells: Merge cells into one large cell to make clear that a label in
Excel applies to multiple columns. Use CONCATENATE, TEXTJOIN or Flash Fill
to merge cells without losing data.
- Strikethrough: This example teaches you how to apply strikethrough
formatting in Excel. You can still read text with a strikethrough effect.
- Superscript and Subscript: It's easy to format a character as superscript
(slightly above the baseline) or subscript (slightly below the baseline) in
Excel.
- Check Mark: To insert a check mark symbol in Excel, simply press SHIFT + P
and use the Wingdings 2 font.
- Remove Leading Zeros: This guide teaches you how to remove leading
zeros in Excel.
5. Find & Select
- Find Features: This page illustrates useful find features in Excel. Learn how
to perform workbook-wide searches, case-sensitive searches, find exact cell
content, and use wildcards.
- Wildcards: Excel has 3 wildcards. A question mark (?) matches exactly one
character. An asterisk (*) matches zero or more characters. And a tilde (~).
- Delete Blank Rows: This example teaches you how to delete blank rows or
rows that contain blank cells.
- Row Differences: This example teaches you how to quickly highlight cells
whose contents are different from the comparison cell in each row.
- Copy Visible Cells Only: By default, Excel copies both visible and hidden
cells. However, it is possible to copy visible cells only.
- Search Box: This example teaches you how to create your own search box
in Excel.
6. Templates
- Budget: This example shows you how to create a budget in Excel. Follow
this step-by-step guide and take control of your finances.
- Calendar: This example describes how to create a calendar in Excel (2025
calendar, 2026 calendar, etc). If you are in a hurry, simply download the
Excel file.
- Holidays: This example teaches you how to get the date of a holiday for any
year (2025, 2026, etc).
- Meal Planner: This article shows you how to create a meal planner in Excel.
Use drop-down lists to easily select meals for breakfast, lunch, and dinner.
- Invoice: This article describes how to create a simple invoice in Excel.
- Automated Invoice: This article describes how to automate the generation
of invoices in Excel.
- Default Templates: Book.xltx and Sheet.xltx are two special templates you
can create and add to the XLStart folder. As a result, Excel uses Book.xltx as
the basis for new workbooks and Sheet.xltx as the basis for new worksheets.
- Time Sheet: This example teaches you how to create a simple timesheet
calculator in Excel.
- BMI calculator: Create a BMI calculator in Excel and find out if you are a
healthy weight. Body mass index (BMI) is a measure of body fat based on
weight and height that applies to adult men and women.
7. Data Validation
- Reject Invalid Dates: This example teaches you how to use data validation
to reject invalid dates.
- Budget Limit: To avoid exceeding a budget limit in Excel, simply use data
validation and the SUM function.
- Prevent Duplicate Entries: To prevent duplicate values from being entered
into Excel, use data validation and the COUNTIF function.
- Product Codes: Use data validation to only allow the input of specific
product codes. For example, only allow codes that are 4 characters long,
start with a C, etc.
- Drop-down List: Drop-down lists in Excel are helpful if you want to be sure
that users select an item from a list, instead of typing their own values.
- Dependent Drop-down Lists: This example describes how to create
dependent drop-down lists in Excel.
- Cm to inches: 1 cm = 0.3937 inch and 1 inch = 2.54 cm. Use a simple
formula, the CONVERT function or download our free unit converter to
convert from cm to inches or vice versa.
- Kg to lbs: 1 kg = 2.20462 lbs (pounds) and 1 lb (pound) = 0.45359 kg. Use
a simple formula, the CONVERT function or download our free unit converter
to convert from kg to lbs or vice versa.
8. Keyboard Shortcuts
- Function Keys: Function keys in Excel allow you to do things with your
keyboard instead of your mouse to increase your speed.
- Insert Row: To quickly insert a row in Excel, select a row and use the
shortcut CTRL SHIFT +.
- Save As: Use the shortcut F12 to display the Save As dialog box in Excel.
Press CTRL + s to save an existing workbook. It's good practice to
periodically save while you are working on your Excel file.
- Delete Row: To quickly delete a row in Excel, select a row and use the
shortcut CTRL - (minus sign).
- Formula to Value: To quickly convert a formula to a value in Excel or to
convert multiple formulas to values, execute the following steps.
- Scroll Lock: When Scroll Lock is turned on, you can use the arrow keys to
scroll through the worksheet without changing the active cell. Excel displays
Scroll Lock in the status bar.
- Bullet Points: This page illustrates 4 ways to insert bullet points in Excel.
- Line Break: You can insert a line break in Excel by pressing Alt + Enter.
When concatenating strings, use CHAR(10) to insert a line break.
- Show Formulas: By default, Excel shows the results of formulas. To show
the formulas instead of their results, press CTRL + ` (you can find this key
above the tab key).
- Paste Special: Use the shortcut Ctrl + Alt + V to display the Paste Special
dialog box in Excel. Next, press an underlined letter to paste formulas,
values, formatting, etc.
9. Print
- Workbook Views: Excel offers three different workbook views: Normal, Page
Layout and Page Break Preview.
- Page Breaks: Insert a page break in Excel to specify where a new page will
begin in the printed copy.
- Headers and Footers: This example teaches you how to add information to
the header (top of each printed page) or footer (bottom of each printed
page) in Excel.
- Page Numbers: This example teaches you how to insert page numbers in
Excel.
- Print Titles: You can specify rows and columns in Excel that will be printed
on each printed page. This can make your printed copy easier to read.
- Center on Page: To center a range of cells on a printed page in Excel
automatically, execute the following steps.
- Print Gridlines & Headings: Print gridlines (the horizontal and vertical lines
on your worksheet) and row/column headers (1, 2, 3 etc. and A, B, C etc.) to
make your printed copy easier to read.
- Print Area: If you set a print area in Excel, only that area will be printed. The
print area is saved when you save the workbook.
10. Share
- Embed: Embed an Excel worksheet in a Word document and work with
Excel in Word. You can also embed files in Excel.
- PDF: This page teaches you how to convert an Excel file to a PDF file.
- Read-only Workbook: This example shows you how to make your Excel
workbook read-only.
- Mark as Final: Mark a workbook as final in Excel to indicate that this is the
final version of your workbook. Only use this feature to discourage editing.
Users can still edit the workbook.
Excel Functions
Discover how functions in Excel help you save time. These 11 chapters are
your ideal starting point to master Excel functions!
1 Count and Sum: The most used functions in Excel are the functions that
count and sum. You can count and sum based on one criteria or multiple
criteria.
2 Logical: Learn how to use Excel's logical functions, such as IF, AND, OR and
NOT.
3 Cell References: Cell references in Excel are very important. Understand
the difference between relative, absolute and mixed reference, and you are
on your way to success.
4 Date & Time: To enter a date, use the "/" or "-" characters. To enter a time,
use the ":" (colon).
5 Text: Excel has many functions to offer when it comes to manipulating text
strings.
6 Lookup & Reference: Learn all about Excel's lookup & reference functions,
such as VLOOKUP, HLOOKUP, MATCH, INDEX and CHOOSE.
7 Financial: This chapter illustrates Excel's most popular financial functions.
8 Statistical: An overview of some very useful statistical functions in Excel.
9 Round: This chapter illustrates three functions to round numbers in Excel.
ROUND, ROUNDUP and ROUNDDOWN.
10 Formula Errors: This chapter teaches you how to fix some common
formula errors.
11 Array Formulas: This chapter helps you understand array formulas in
Excel.
Take your Excel skills to the next level! 🚀 You can find related examples and
functions on the right side of each chapter. Below you can find a complete
overview.
- Running Total: This page teaches you how to create a running total
(cumulative sum) in Excel. A running total changes each time new data is
added to a list.
- Sumif: The powerful SUMIF function in Excel sums cells based on one
criteria. This page contains many easy to follow SUMIF examples.
- Sumproduct: To calculate the sum of the products of corresponding
numbers in one or more ranges, use Excel's powerful SUMPRODUCT function.
2. Logical
- If: The IF function is one of the most used functions in Excel. This page
contains many easy to follow IF examples.
- Add a Column: To add a column in Excel, right-click the column letter and
click Insert. When you insert a column or row, cell references update
automatically.
- Absolute Reference: To create an absolute reference in Excel, add $
symbols to a cell or range reference. This locks the reference. When you
copy a formula, an absolute reference never changes.
- Address: The ADDRESS function in Excel creates a cell reference as text,
based on a given row and column number.
4. Date & Time
- DateDif: To calculate the number of days, months or years between two
dates in Excel, use the DATEDIF function. The DATEDIF function has three
arguments.
- Today's Date: To enter today's date in Excel, use the TODAY function. To
enter the current date and time, use the NOW function.
- Date and Time Formats: Dates and times in Excel can be displayed in a
variety of ways. To apply a Date or Time format, execute the following steps.
- Calculate Age: To calculate age in Excel, use the DATEDIF function and
TODAY. You can also use the age formula to calculate a person’s exact age in
years, months, and days.
- Time Difference: Calculating the difference between two times in Excel can
be tricky. Times are handled internally as numbers between 0 and 1.
- Weekdays: Use WEEKDAY, NETWORKDAYS and WORKDAY to create cool
weekday formulas in Excel. Are you ready to improve your Excel skills?
- Days until Birthday: To calculate the number of days until your birthday in
Excel, execute the following steps.
- Last Day of the Month: To get the date of the last day of the month in Excel,
use the EOMONTH (End of Month) function.
- Add or Subtract Time: Use the TIME function in Excel to add or subtract
hours, minutes and seconds. To add up times in Excel, simply use the SUM
function.
- Quarter: An easy formula that returns the quarter for a given date. There's
no built-in function in Excel that can do this.
- Day of the Year: An easy formula that returns the day of the year for a
given date. There's no built-in function in Excel that can do this.
- Days between Dates: To calculate the number of days between two dates
in Excel, subtract the start date from the end date, use DAYS or use
DATEDIF.
5. Text
- Separate Strings: To separate strings in Excel, use RIGHT, LEN, FIND and
LEFT. If you're not a formula hero, use Flash Fill to split text strings in Excel.
- Count Words: Use TRIM, LEN, SUBSTITUTE and SUMPRODUCT in Excel to
count words. For example, let's count how many times a specific word occurs
in a cell. This trick is pretty cool.
- Text to Columns: To separate the contents of one Excel cell into separate
columns, you can use the 'Convert Text to Columns Wizard'.
- Find: Use the FIND function in Excel to find the position of a substring in a
string. The FIND function is case-sensitive.
- Search: Use the SEARCH function in Excel to find the position of a substring
in a string. The SEARCH function is case-insensitive and supports wildcards.
- Change Case: To change the case of text in Excel, use LOWER, UPPER or
PROPER. If you're not a formula hero, use Flash Fill to change case in Excel.
- Remove Spaces: The TRIM function in Excel removes leading spaces, extra
spaces and trailing spaces. Use the SUBSTITUTE function to remove all
spaces or non-breaking spaces.
- Compare Text: This example shows two ways to compare text strings in
Excel. One is case-sensitive and one is case-insensitive.
- Substitute vs Replace: If you know the text to be replaced, use the
SUBSTITUTE function in Excel. If you know the position of the text to be
replaced, use the REPLACE function.
- Text: When joining text and a number, use the TEXT function in Excel to
format that number. This page contains many easy to follow TEXT function
examples.
- Concatenate: Use CONCATENATE, CONCAT, TEXTJOIN or the & operator in
Excel to concatenate (join) two or more text strings.
- Left Lookup: The VLOOKUP function only looks to the right. To look up a
value in any column and return the corresponding value to the left, simply
use INDEX and MATCH.
- Locate Maximum Value: To find the maximum value in Excel, use the MAX
function. To find the cell address of the maximum value in a column, use
MAX, MATCH and ADDRESS.
- Indirect: Use the INDIRECT function in Excel to convert a text string into a
valid reference. You can use the & operator to create text strings.
- Two-column Lookup: This example teaches you how to perform a two-
column lookup in Excel.
- Closest Match: To find the closest match to a target value in a data column,
use INDEX, MATCH, ABS and MIN in Excel. Use the VLOOKUP function in Excel
to find an approximate match.
- Compare Two Columns: To compare two columns, use IF, ISERROR and
MATCH in Excel. You can display the duplicates or the unique values.
- Xlookup: If you have Excel 365 or Excel 2021, use XLOOKUP instead of
VLOOKUP. The XLOOKUP function is easier to use and has some additional
advantages.
- Count with Or Criteria: Counting with Or criteria in Excel can be tricky. This
article shows several easy to follow examples.
- Sum Every Nth Row: This example shows you how to create an array
formula that sums every nth row in Excel. We will show it for n = 3, but you
can do this for any number.
- Sum Largest Numbers: To sum the largest numbers in an Excel range,
create an array formula or simply combine the SUMIF function with the
LARGE function.
- Sum with Or Criteria: Summing with Or criteria in Excel can be tricky. This
article shows several easy to follow examples.
- Most Frequently Occurring Word: This example teaches you how to find the
most frequently occurring word in Excel.
- Dynamic Arrays: Dynamic array formulas, entered into a single cell, fill
multiple cells. This behavior in Excel 365/2021 is called spilling.
- LET function: Use the LET function in Excel 365/2021 to declare variables
and assign values (or calculation results) to variables. Next, use these
variables in a calculation.
- Array Manipulation: Use the new array manipulation functions in Excel 365
to quickly combine, shape and resize arrays.
- Lambda: Use LAMBDA and the Name Manager in Excel to create your own
Excel function. You can use this custom function like any other Excel
function!
- TextSplit: Use the TEXTSPLIT function in Excel 365 to split text into rows or
columns using delimiters.
Data Analysis in Excel
This section illustrates the powerful features that Excel offers for analyzing
data.
1 Sort: You can sort your Excel data by one column or multiple columns. You
can sort in ascending or descending order.
2 Filter: Filter your Excel data if you only want to display records that meet
certain criteria.
3 Conditional Formatting: Conditional formatting in Excel enables you to
highlight cells with a certain color, depending on the cell's value.
4 Charts: A simple Excel chart can say more than a sheet full of numbers. As
you'll see, creating charts is very easy.
5 Pivot Tables: Pivot tables are one of Excel's most powerful features. A pivot
table allows you to extract the significance from a large, detailed data set.
6 Tables: Master Excel tables and analyze your data quickly and easily.
7 What-If Analysis: What-If Analysis in Excel allows you to try out different
values (scenarios) for formulas.
8 Solver: Excel includes a tool called Solver that uses techniques from
operations research, a field focused on optimizing decisions, to solve all
kinds of problems.
9 Analysis ToolPak: The Analysis ToolPak is an Excel add-in program that
provides data analysis tools for financial, statistical and engineering data
analysis.
Take your Excel skills to the next level! 🚀 You can find related examples and
features on the right side of each chapter. Below you can find a complete
overview.
1. Sort
- Custom Sort Order: You can use Excel to sort data in a custom order. In this
example, we would like to sort by Priority (High, Normal, Low).
- Sort by Color: This example teaches you how to sort data by color in Excel.
- Reverse List: This article teaches you how to reverse the order of a list in
Excel. For example, we want to reverse the list in column A.
- Randomize List: This article teaches you how to randomize (shuffle) a list in
Excel.
- SORT function: Use the magic SORT function in Excel 365/2021 to sort your
Excel data by one column or multiple columns. Let's give it a try.
- Sort by Date: This guide walks you through the steps to sort by date in
Excel. It starts with how to convert text-formatted dates to actual date
values, followed by basic sorting methods and advanced techniques like
sorting dates by month and sorting birthdays.
- Alphabetize: While sorting data alphabetically in Excel is easy, certain
situations may require more advanced techniques to achieve the desired
alphabetical order.
2. Filter
- Number and Text Filters: This example teaches you how to apply a number
filter and a text filter to only display records that meet certain criteria.
- Date Filters: This page teaches you how to apply a date filter to only display
records that meet certain criteria.
- Advanced Filter: This example teaches you how to apply an advanced filter
in Excel to only display records that meet complex criteria.
- Data Form: The data form in Excel allows you to add, edit and delete
records (rows) and display only those records that meet certain criteria.
Especially when you have wide rows and you want to avoid repeated
scrolling to the right and left, the data form can be useful.
- Remove Duplicates: To quickly remove duplicates in Excel, use the tool on
the Data tab. Use the Advanced Filter if you don't want to delete duplicates
permanently.
- Outlining Data: Outlining data makes your data easier to view. In this
example, we will total rows of related data and collapse a group of columns.
- Subtotal: Use the SUBTOTAL function in Excel instead of SUM, COUNT, MAX,
etc. to ignore rows hidden by a filter or to ignore manually hidden rows.
- Unique Values: To find unique values in Excel, use the Advanced Filter. You
can extract unique values or filter for unique values.
- FILTER function: Use the magic FILTER function in Excel 365/2021 to extract
records that meet certain criteria. The FILTER function is quite versatile.
3. Conditional Formatting
- Manage Rules: To view all conditional formatting rules in a workbook, use
the Conditional Formatting Rules Manager. You can also use this screen to
create, edit and delete rules.
- Data Bars: Data bars in Excel make it very easy to visualize values in a
range of cells. A longer bar represents a higher value.
- Color Scales: Color Scales in Excel make it very easy to visualize values in a
range of cells. The shade of the color represents the value in the cell.
- Icon Sets: Icon Sets in Excel make it very easy to visualize values in a range
of cells. Each icon represents a range of values.
- Find Duplicates: This page teaches you how to find duplicate values (or
triplicates) and how to find duplicate rows in Excel.
- Shade Alternate Rows: This example shows you how to use conditional
formatting to shade alternate rows.
- Compare Two Lists: This page describes how to compare two lists in Excel
using conditional formatting and COUNTIF.
- Conflicting Rules: Sometimes multiple conditional formatting rules in Excel
conflict. A higher rule always wins. This example illustrates two different
results.
- Heat Map: To create a heat map in Excel, simply use conditional formatting.
A heat map is a graphical representation of data where individual values are
represented as colors.
4. Charts
- Column Chart: Column charts are used to compare values across categories
by using vertical bars. To create a column chart, execute the following steps.
- Line Chart: Line charts are used to display trends over time. Use a line
chart if you have text labels, dates or a few numeric labels on the horizontal
axis.
- Pie Chart: Pie charts are used to display the contribution of each value
(slice) to a total (pie). Pie charts always use one data series.
- Bar Chart: A bar chart is the horizontal version of a column chart. Use a bar
chart if you have large text labels.
- Area Chart: An area chart is a line chart with the areas below the lines filled
with colors. Use a stacked area chart to display the contribution of each
value to a total over time.
- Scatter Plot: Use a scatter plot (XY chart) to show scientific XY data. Scatter
plots are often used to find out if there's a relationship between variables X
and Y.
- Data Series: A row or column of numbers that are plotted in a chart is called
a data series. You can plot one or more data series in a chart.
- Axes: Most chart types have two axes: a horizontal axis (or x-axis) and a
vertical axis (or y-axis). This example teaches you how to change the axis
type, add axis titles and how to change the scale of the vertical axis.
- Trendline: This example teaches you how to add a trendline to a chart in
Excel.
- Error Bars: This page teaches you how to quickly add error bars to a chart
in Excel, followed by instructions for adding custom error bars.
- Sparklines: Sparklines in Excel are graphs that fit in one cell. Sparklines are
great for displaying trends. Excel offers three sparkline types: Line, Column
and Win/Loss.
- Combination Chart: A combination chart is a chart that combines two or
more chart types in a single chart.
- Gauge Chart: A gauge chart (or speedometer chart) combines a Doughnut
chart and a Pie chart in a single chart. If you are in a hurry, simply download
the Excel file.
- Thermometer Chart: This example teaches you how to create a
thermometer chart in Excel. A thermometer chart shows you how much of a
goal has been achieved.
- Gantt Chart: Excel does not offer Gantt as a chart type, but it's easy to
create a Gantt chart by customizing the stacked bar chart type.
- Pareto Chart: A Pareto chart combines a column chart and a line graph. The
Pareto principle states that, for many events, roughly 80% of the effects
come from 20% of the causes.
5. Pivot Tables
- Group Pivot Table Items: This example teaches you how to group pivot
table items. Learn how to group products and how to group dates by
quarters.
- Multi-level Pivot Table: You can drag more than one field to an area in a
pivot table. We'll look at an example of multiple row fields, multiple value
fields and multiple report filter fields.
- Frequency Distribution: Did you know that you can use pivot tables to easily
create a frequency distribution in Excel? You can also use the Analysis
Toolpak to create a histogram.
- Pivot Chart: A pivot chart is the visual representation of a pivot table in
Excel. Pivot charts and pivot tables are connected with each other.
- Slicers: Use slicers in Excel to quickly and easily filter pivot tables. Connect
multiple slicers to multiple pivot tables to create awesome reports.
- Update Pivot Table: Any changes you make to the data set are not
automatically picked up by the pivot table. Refresh the pivot table or change
the data source to update the pivot table with the applied changes.
- Calculated Field/Item: This example teaches you how to insert a calculated
field or calculated item in a pivot table.
- GetPivotData: To quickly enter a GETPIVOTDATA function in Excel, type an
equal sign (=) and click a cell in a pivot table. The GETPIVOTDATA function
can be quite useful.
6. Tables
- Structured References: When working with tables in Excel, you can use
structured references to make your formulas easier to understand.
- Table Styles: Quickly format a range of cells by choosing a table style. You
can also create your own table style.
- Merge Tables: You can use tables and the VLOOKUP function in Excel to
quickly merge two tables. This trick will bring your Excel game to a new
level.
- Table as Source Data: One of the great things about tables in Excel is that
you can use a table as source data for a chart, pivot table, etc.
- Remove Table Formatting: This article will explain how to remove two types
of table formatting in Excel. You'll learn how to remove formatting from Excel
tables and manually formatted data ranges.
- Quick Analysis: Use the Quick Analysis tool in Excel to quickly analyze your
data. Quickly calculate totals, quickly insert tables, quickly apply conditional
formatting and more.
7. What-If Analysis
- Data Tables: Instead of creating different scenarios, you can create a data
table to quickly try out different values for formulas. You can create a one
variable data table or a two variable data table.
- Goal Seek: If you know the result you want from a formula, use Goal Seek in
Excel to find the input value that produces this formula result.
- Quadratic Equation: A quadratic equation is of the form ax2 + bx + c = 0
where a ≠ 0. A quadratic equation can be solved by using the quadratic
formula. You can also use Excel's Goal Seek feature to solve a quadratic
equation.
8. Solver
- Transportation Problem: Use the solver in Excel to find the number of units
to ship from each factory to each customer that minimizes the total cost.
- Assignment Problem: Use the solver in Excel to find the assignment of
persons to tasks that minimizes the total cost.
- Shortest Path Problem: Use the solver in Excel to find the shortest path
from node S to node T in an undirected network. Points in a network are
called nodes (S, A, B, C, D, E and T). Lines in a network are called arcs (SA,
SB, SC, AC, etc).
- Maximum Flow Problem: Use the solver in Excel to find the maximum flow
from node S to node T in a directed network.
- Capital Investment: Use the solver in Excel to find the combination of
capital investments that maximizes the total profit.
- Sensitivity Analysis: Sensitivity analysis gives you insight into how the
optimal solution changes when you change the coefficients of the model.
After the solver found a solution, you can create a sensitivity report.
- System of Linear Equations: This example shows you how to solve a system
of linear equations in Excel.
9. Analysis Toolpak
- Histogram: This example teaches you how to make a histogram in Excel.
- Descriptive Statistics: You can use the Analysis Toolpak add-in to generate
descriptive statistics. For example, you may have the scores of 14
participants for a test.
- Anova: This example teaches you how to perform a single factor ANOVA
(analysis of variance) in Excel. A single factor or one-way ANOVA is used to
test the null hypothesis that the means of several populations are all equal.
- F-Test: This example teaches you how to perform an F-Test in Excel. The F-
Test is used to test the null hypothesis that the variances of two populations
are equal.
- t-Test: This example teaches you how to perform a t-Test in Excel. The t-
Test is used to test the null hypothesis that the means of two populations are
equal.
- Moving Average: Let's calculate the moving average of a time series in
Excel. A moving average is used to smooth out irregularities (peaks and
valleys) to easily recognize trends.
- Exponential Smoothing: Exponential smoothing is used to smooth out
irregularities (peaks and valleys) to easily recognize trends.
- Correlation: We can use the CORREL function or the Analysis Toolpak add-in
in Excel to find the correlation coefficient between two variables.
Excel VBA
VBA (Visual Basic for Applications) is the programming language of Excel. If
you're an Excel VBA beginner, these 16 chapters are a great way to
start. Excel VBA is easy and fun!
1 Create a Macro: With Excel VBA you can automate tasks in Excel by writing
so-called macros. In this chapter, learn how to create a simple macro.
2 MsgBox: The MsgBox is a dialog box in Excel VBA you can use to inform the
users of your program.
3 Workbook and Worksheet Object: Learn more about the Workbook and
Worksheet object in Excel VBA.
4 Range Object: The Range object, which is the representation of a cell (or
cells) on your worksheet, is the most important object of Excel VBA.
5 Variables: This chapter teaches you how to declare, initialize and display a
variable in Excel VBA.
6 If Then Statement: Use the If Then statement in Excel VBA to execute code
lines if a specific condition is met.
7 Loop: Looping is one of the most powerful programming techniques. A loop
in Excel VBA enables you to loop through a range of cells with just a few
codes lines.
8 Macro Errors: This chapter teaches you how to fix macro errors in Excel.
9 String Manipulation: In this chapter, you'll find the most important
functions to manipulate strings in Excel VBA.
10 Date and Time: Learn how to work with dates and times in Excel VBA.
11 Events: Events are actions performed by users which trigger Excel VBA to
execute code.
12 Array: An array is a group of variables. In Excel VBA, you can refer to a
specific variable (element) of an array by using the array name and the
index number.
13 Function and Sub: In Excel VBA, a function can return a value while a sub
cannot.
14 Application Object: The mother of all objects is Excel itself. We call it the
Application object. The application object gives access to a lot of Excel
related options.
15 ActiveX Controls: Learn how to create ActiveX controls, such as command
buttons, text boxes, list boxes etc.
16 Userform: This chapter teaches you how to create an Excel VBA Userform.
Take your Excel VBA skills to the next level! 🚀 You can find related examples
and features on the right side of each chapter. Below you can find a
complete overview.
1. Create a Macro
- Swap Values: This example teaches you how to swap two values in Excel
VBA. You will often need this structure in more complicated programs as we
will see later.
- Run Code from a Module: As a beginner to Excel VBA, you might find it
difficult to decide where to put your VBA code. This example teaches you
how to run code from a module.
- Macro Recorder: The Macro Recorder, a very useful tool included in Excel
VBA, records every task you perform with Excel. All you have to do is record
a specific task once. Next, you can execute the task over and over with the
click of a button.
- Programming Charts: Use Excel VBA to create two programs. One program
loops through all charts on a sheet and changes each chart to a pie chart.
The other program changes some properties of the first chart.
4. Range Object
- CurrentRegion: You can use the CurrentRegion property in Excel VBA to
return the range bounded by any combination of blank rows and blank
columns.
- Dynamic Range: We will look at a program in Excel VBA that colors the
maximum value of a dynamic range.
- Resize: The Resize property in Excel VBA makes a range a specific number
of rows and columns smaller or larger. The Resize property always takes the
top left cell of a range as the starting point.
- Entire Rows and Columns: This example teaches you how to select entire
rows and columns in Excel VBA. Are you ready?
- Offset: The Offset property in Excel VBA takes the range which is a
particular number of rows and columns away from a certain range.
- From Active Cell to Last Entry: This example illustrates the End property of
the Range object in Excel VBA. We will use this property to select the range
from the Active Cell to the last entry in a column.
- Union and Intersect: The Union method in Excel VBA returns a Range object
that represents the union of two or more ranges.
- Test a Selection: This program in Excel VBA uses the Count property,
IsNumeric function, IsEmpty function and Intersect method to test a
selection.
- Font: The Font property of the Range object in Excel VBA gives access to a
lot of other properties. That is because the Font property returns an object
itself; the Font object. The Font object has many properties like the Color
property and the Bold property.
- Background Colors: Changing background colors in Excel VBA is easy. Use
the Interior property to return an Interior object. Then use the ColorIndex
property of the Interior object to set the background color of a cell.
- Sort a Range: You can use the Sort method in Excel VBA to sort ranges in
Excel. This article provides clear and practical examples to help you get
started with sorting ranges using Excel VBA.
- Areas Collection: This page illustrates the Areas collection in Excel VBA.
- Compare Ranges: Learn how to create a program in Excel VBA that
compares randomly selected ranges and highlights cells that are unique.
5. Variables
- Option Explicit: We strongly recommend to use Option Explicit at the start
of your Excel VBA code. Using Option Explicit forces you to declare all your
variables.
- Variable Scope: The scope of a variable in Excel VBA determines where that
variable may be used. You determine the scope of a variable when you
declare it. There are three scoping levels: procedure level, module level, and
public module level.
- Life of Variables: Sometimes you want to retain the value of a variable in
Excel VBA when a procedure ends. You can achieve this by using the Static
keyword.
- Type Mismatch: The type mismatch error in Excel VBA occurs when you try
to assign a value to a variable that isn't of the correct type.
6. If Then Statement
- Logical Operators: The three most used logical operators in Excel VBA are:
And, Or and Not. As always, we will use easy examples to make things more
clear.
- Select Case: Instead of multiple If Then statements in Excel VBA, you can
use the Select Case structure.
- Tax Rates: We will look at a program in Excel VBA that calculates the tax on
an income.
- Mod Operator: The Mod operator in Excel VBA gives the remainder of a
division.
- Prime Number Checker: Learn how to create a program in Excel VBA that
checks whether a number is a prime number or not.
- Find Second Highest Value: Use two If Then Statements in Excel VBA to find
the second highest value in a randomly selected range.
- Sum by Color: Learn how to create a program in Excel VBA that sums
numbers by color.
- Delete Blank Cells: In this example, we will create a VBA macro that deletes
blank cells. First, we declare two variables of type Integer.
7. Loop
- Loop through Defined Range: Use Excel VBA to loop through a defined
range. For example, when we want to square the numbers in the range
A1:A3.
- Loop through Entire Column: We will look at a program in Excel VBA that
loops through the entire first column and colors all values that are lower than
a certain value.
- Do Until Loop: VBA code placed between Do Until and Loop will be repeated
until the part after Do Until is true.
- Step Keyword: You can use the Step keyword in Excel VBA to specify a
different increment for the counter variable of a loop.
- Create a Pattern: You can create a pattern of colors on your worksheet by
using a double loop, the Step keyword and the Offset property in Excel VBA.
- Sort Numbers: In this example, we will create a VBA macro that sorts
numbers. First, we declare three variables of type Integer and one Range
object.
- Randomly Sort Data: We will look at a program in Excel VBA that randomly
sorts data (in this example randomly sorts names).
- Remove Duplicates: Use Excel VBA to remove duplicates. In column A we
have 10 numbers. We want to remove the duplicates from these numbers
and place the unique numbers in column B.
- Error Handling: Use Excel VBA to create two programs. One program simply
ignores errors. The other program continues execution at a specified line
upon hitting an error.
- Err Object: When an error in Excel VBA occurs, the properties of the Err
object are filled with information.
- Interrupt a Macro: You can interrupt a macro in Excel at any time by
pressing Esc or Ctrl + Break.
- Subscript Out of Range: The 'subscript out of range' error in Excel VBA
occurs when you refer to a nonexistent collection member or a nonexistent
array element.
- Macro Comments: A macro comment is a piece of text in a macro which will
not be executed by Excel VBA. It is only there to provide you information
about the macro.
9. String Manipulation
- Separate Strings: Let's create a program in Excel VBA that separates
strings. Place a command button on your worksheet and add the following
code lines.
- Reverse Strings: We will look at a program in Excel VBA that can reverse
strings.
- Convert to Proper Case: This page illustrates how to create a program in
Excel VBA that converts text to proper case. That is, the first letter of each
word is in uppercase, and all other letters are in lowercase.
- InStr: Use InStr in Excel VBA to find the position of a substring in a string.
The InStr function is quite versatile.
- Count Words: Learn how to create a program in Excel VBA that counts the
number of words in a selected range. One or more spaces are assumed to
separate words.
10. Date and Time
- Compare Dates and Times: This example teaches you how to compare
dates and times in Excel VBA.
- DateDiff Function: The DateDiff function in Excel VBA can be used to get
the number of days, weeks, months or years between two dates.
- Weekdays: We will look at a program in Excel VBA that calculates the
number of weekdays between two dates.
- Delay a Macro: To execute a sub in Excel VBA after a specific time, use
onTime, Now and the TimeValue function. First, place a sub into a module.
- Year Occurrences: Learn how to create a program in Excel VBA that counts
the number of year occurrences.
- Tasks on Schedule: Use Excel VBA to set the background color of tasks that
are on schedule to green, and the background color of tasks that are behind
schedule to red.
- Sort Birthdays: Let's create a program in Excel VBA that sorts birthdays by
months first and days second (so we ignore years).
- Date Format: Changing the date format in Excel VBA is easy. Use the
NumberFormat property in Excel VBA to set the desired date format.
11. Events
- BeforeDoubleClick Event: Code added to the Worksheet BeforeDoubleClick
Event will be executed by Excel VBA when you double click a cell on a
worksheet.
- Highlight Active Cell: Learn how to create a program in Excel VBA that
highlights the row and column of the Active Cell (selected cell). This program
will amaze and impress your boss.
- Create a Footer Before Printing: We will look at a program in Excel VBA that
creates a footer before printing a workbook.
- Bills and Coins: Use Excel VBA to create a program that splits an amount of
money into bills and coins.
- Rolling Average Table: Learn how to create a program in Excel VBA that
creates a rolling average table.
12. Array
- Dynamic Array: If the size of your array increases and you don't want to fix
the size of the array, you can use the ReDim keyword. Excel VBA then
changes the size of the array automatically.
- Array Function: The Array function in Excel VBA can be used to quickly and
easily initialize an array.
- Month Names: You can use the Array function in Excel VBA to return the
names of the months.
- Size of an Array: To get the size of an array in Excel VBA, use the UBound
function and the LBound function.
13. Function and Sub
- User Defined Function: Excel has a large collection of functions. In most
situations, those functions are sufficient to get the job done. If not, you can
use Excel VBA to create your own function.