Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
12 views63 pages

Introduction To Excel

This document serves as an introduction to Microsoft Excel, covering essential features for beginners, including range operations, formulas, functions, and basic functionalities. It provides detailed explanations of various tools and techniques such as AutoFill, data validation, and keyboard shortcuts to enhance Excel skills. The document also includes practical examples and templates to help users effectively utilize Excel for data management and analysis.

Uploaded by

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

Introduction To Excel

This document serves as an introduction to Microsoft Excel, covering essential features for beginners, including range operations, formulas, functions, and basic functionalities. It provides detailed explanations of various tools and techniques such as AutoFill, data validation, and keyboard shortcuts to enhance Excel skills. The document also includes practical examples and templates to help users effectively utilize Excel for data management and analysis.

Uploaded by

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

Introduction to Excel

If you're an Excel beginner, this is the perfect place to start.

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?

- Transpose: Use the 'Paste Special Transpose' option to switch rows to


columns or columns to rows in Excel. You can also use the TRANSPOSE
function.
- Split Cells: To split a cell in Excel, add a new column, change the column
widths and merge cells. To split the contents of a cell into multiple cells, use
the Text to Columns wizard, flash fill or formulas.
- Flash Fill: Flash fill is a great Excel tool. Learn how to use flash fill to
automatically extract data, combine data, and much more.

- 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.

- Subtract: There's no SUBTRACT function in Excel. However, there are many


ways to subtract numbers in Excel. Are you ready to improve your Excel
skills?
- Multiply: To multiply numbers in Excel, use the asterisk symbol (*) or the
PRODUCT function. Learn how to multiply columns and how to multiply a
column by a constant.
- Divide: There's no DIVIDE function in Excel. Simply use the forward slash (/)
to divide numbers in Excel.
- Square Root: The square root of a number is a value that, when multiplied
by itself, gives the number. The SQRT function in Excel returns the square
root of a number.
- Percentage: Calculating percentages in Excel is easy. Percentage simply
means 'out of 100', so 72% is '72 out of 100' and 4% is '4 out of 100', etc.
- Named Range: Create a named range or a named constant and use these
names in your Excel formulas. This way you can make your formulas easier
to understand.
- Dynamic Named Range: A dynamic named range expands automatically
when you add a value to the range.
- Paste Options: This example illustrates the various paste options in Excel.
- Discount: If you know the original price and the discounted price, you can
calculate the percentage discount. If you know the original price and the
percentage discount, you can calculate the discounted price, etc.

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.

- View Multiple Workbooks: If you want to view multiple Excel workbooks at


the same time, execute the following steps.
- AutoRecover: Excel periodically saves a copy of your Excel file. Learn how
to recover a file that was never saved and how to recover a file that has
been saved at least once.
- Merge Excel Files: To merge Excel files into one, use the 'Move or Copy'
feature. If you need to merge many Excel files, consider using VBA to
automate the process.
- Save in 97-2003 Format: If you save your Excel files in 97-2003 format (.xls
instead of the new .xlsx format), users who do not have Excel 2007 or later
installed on their computer, can still open your Excel files.
3. Worksheets
- Zoom: In most cases, you can use the minus and plus symbols in the status
bar to quickly zoom the document. Use the buttons on the View tab to zoom
to a specific percentage and to zoom to a selection.
- Split: You can split your Excel worksheet into panes to view multiple distant
parts of your worksheet at once. Simply use the split bar to change the size
of each pane.
- Freeze Panes: If you have a large table of data in Excel, it can be useful to
freeze rows or columns. This way you can keep rows or columns visible while
scrolling through the rest of the worksheet.

- Group Worksheets: Group worksheets in Excel to edit multiple worksheets


at the same time. Our workbook contains 3 similar worksheets (North, Mid
and South) and a blank fourth worksheet.
- Consolidate: You can use Excel's Consolidate feature to consolidate your
worksheets (located in one workbook or multiple workbooks) into one
worksheet.
- View Multiple Worksheets: If you want to view multiple Excel worksheets at
the same time, execute the following steps.
- Get Sheet Name: To return the sheet name in a cell, use CELL, FIND and
MID in Excel. There's no built-in function in Excel that can get the sheet
name.
- Comments: Insert a comment in Excel to start a conversation or to give
feedback about the content of a cell. Old style comments are still available
and are now called notes.
- Spell Check: Learn how to check the spelling of text in Excel, add words to
your custom dictionary (or AutoCorrect list) and learn how to change spell
checking options.
- Unhide Sheets: Unhiding sheets in Excel is easy. A workbook must contain
at least one visible worksheet.
- Chart Sheet: You can find most charts on the same worksheet as the source
data (embedded charts). However, you can also move a chart to a separate
sheet that only contains a chart (chart sheet).
4. Format Cells
- Decimal Places: Learn how to show fewer or more decimal places in Excel
without changing the number itself. You can also round a number.
- Fractions: This example teaches you how to enter a fraction in Excel and
how to change the format of a fraction.
- Currency vs Accounting: The Currency format and the Accounting format in
Excel are very similar to each other. This example shows the difference.
- Text to Numbers: In Excel, text is left-aligned and numbers are right-
aligned. This example teaches you how to convert 'text strings that
represent numbers' to numbers.
- Numbers to Text: In Excel, numbers are right-aligned and text is left-
aligned. This example teaches you how to convert numbers to 'text strings
that represent numbers'.
- Custom Number Format: Excel has many built-in formats that you can use:
Currency, Accounting, Date, Time, Percentage, etc. If you cannot find the
right format, you can create a custom number format.
- Format Painter: The Format Painter is one of the most underused features
of Excel. The Format Painter copies formatting from one place and applies it
to another.

- 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.

- Share Workbooks: If you share a workbook in Excel 2016 or older versions,


you can work with other people on the same workbook at the same time.
- OneDrive: Save your Excel files to your OneDrive location and access your
files from any computer or share them with other people.
- Online: You can edit Excel files with Excel Online from anywhere without
having Excel installed on your computer.
- Import Access Data: This example teaches you how to import data from a
Microsoft Access database. In Excel, when you import data, you make a
permanent connection that can be refreshed.
- Microsoft Query: This example teaches you how to import data from a
Microsoft Access database by using the Microsoft Query Wizard. With
Microsoft Query, you can select the columns of data that you want and
import only that data into Excel.
- Import/Export Text Files: This article describes how to import or export text
files. Text files can be comma separated (.csv) or tab separated (.txt)
- XML: Convert your XML file to an Excel file, or vice versa. This enables you
to exchange data between different applications.
11. Protect
- Protect Workbook: This example teaches you how to protect the workbook
structure in Excel.
- Protect Sheet: When you share an Excel file with other users, you may want
to protect a worksheet to help prevent it from being changed.
- Lock Cells: You can lock cells in Excel if you want to protect cells from being
edited.

- 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.

1. Count and Sum


- Countif: The powerful COUNTIF function in Excel counts cells based on one
criteria. This page contains many easy to follow COUNTIF examples.
- Count Blank/Nonblank Cells: This example shows you how to count blank
and nonblank cells in Excel.
- Count Characters: Use the LEN function to count characters in Excel. Use
LEN and SUBSTITUTE to count specific characters in Excel.
- Not Equal To: In Excel, <> means not equal to. The <> operator in Excel
checks if two values are not equal to each other. Let's take a look at a few
examples.
- Count Cells with Text: This page illustrates multiple ways to count cells with
text in Excel. Visit our page about the COUNTIF function to count cells that
contain specific text.
- Sum: Use the SUM function in Excel to sum a range of cells, an entire
column or non-contiguous cells. You can also use AutoSum to quickly add a
total row and a total column.

- 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.

- Comparison Operators: Use comparison operators in Excel to check if two


values are equal to each other, if one value is greater than another value,
etc.
- Or: The OR function in Excel returns TRUE if any of the conditions are true
and returns FALSE if all conditions are false. Combine the OR function with
other functions and become an Excel expert.
- Roll the Dice: This example teaches you how to simulate the roll of two dice
in Excel. If you are in a hurry, simply download the Excel file.
- Ifs: Use the IFS function in Excel 2016 or later when you have multiple
conditions to meet. The IFS function returns a value corresponding to the
first TRUE condition.
- Contains Specific Text: To check if a cell contains specific text, use
ISNUMBER and SEARCH in Excel. There's no CONTAINS function in Excel.
- Switch: The SWITCH function in Excel looks up a specified value in a list of
values and returns the result corresponding to the first match found.
- If Cell is Blank: Use the IF function and an empty string in Excel to check if a
cell is blank. Use IF and ISBLANK to produce the exact same result.
- Absolute Value: The ABS function in Excel returns the absolute value of a
number. In other words: the ABS function removes the minus sign (-) from a
negative number, making it positive.
- And: The AND function in Excel evaluates multiple conditions and returns
TRUE only if all conditions are TRUE.
3. Cell References
- Copy a Formula: Simply use CTRL + c and CTRL + v to copy and paste a
formula in Excel. Use the fill handle in Excel to quickly copy a formula to
other cells.

- 3D-reference: A 3D-reference in Excel refers to the same cell or range on


multiple worksheets. First, we'll look at the alternative.
- Name Box: You can use the name box in Excel to select a cell, range or
named range. You can also use the name box to quickly create a named
range (important).
- External References: An external reference in Excel is a reference to a cell
or range of cells in another workbook.
- Hyperlinks: Use the 'Insert Hyperlink' dialog box in Excel to create a
hyperlink to an existing file, a web page or a place in this document. You can
also use the HYPERLINK function.
- Union and Intersect: This example illustrates how to use the union and
intersect operators in Excel
- Percent Change: The percent change formula is used very often in Excel.
For example, to calculate the Monthly Change and Total Change.

- 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.

- Substring: There's no SUBSTRING function in Excel. Use MID, LEFT, RIGHT,


FIND, LEN, SUBSTITUTE, REPT, TRIM and MAX in Excel to extract substrings.
6. Lookup & Reference
- Vlookup: The VLOOKUP function is one of the most popular functions in
Excel. This page contains many easy to follow VLOOKUP examples.
- Tax Rates: This example teaches you how to calculate the tax on an income
using the VLOOKUP function in Excel.
- Index and Match: Use INDEX and MATCH in Excel and impress your boss.
Instead of using VLOOKUP, use INDEX and MATCH. To perform advanced
lookups, you'll need INDEX and MATCH.
- Two-way Lookup: To lookup a value in a two-dimensional range, use INDEX
and MATCH in Excel.
- Offset: The OFFSET function in Excel returns a cell or range of cells that is a
specified number of rows and columns from a cell or range of cells.
- Case-sensitive Lookup: By default, the VLOOKUP function performs a case-
insensitive lookup. However, you can use INDEX, MATCH and EXACT in Excel
to perform a case-sensitive lookup.

- 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.

- Xmatch: The XMATCH function in Excel enhances the MATCH function by


adding new features, making it ideal for finding the position of items within
arrays or cell ranges.
7. Financial
- PMT: The PMT function in Excel calculates the payment for a loan based on
constant payments and a constant interest rate. This page contains many
easy to follow PMT examples.
- Loans with Different Durations: This example teaches you how to compare
loans with different durations in Excel.
- Investment or Annuity: This example teaches you how to calculate the
future value of an investment or the present value of an annuity.
- Compound Interest: What's compound interest and what's the formula for
compound interest in Excel? This example gives you the answers to these
questions.
- CAGR: There's no CAGR function in Excel. However, simply use the RRI
function in Excel to calculate the compound annual growth rate (CAGR) of an
investment over a period of years.
- Loan Amortization Schedule: This example teaches you how to create a
loan amortization schedule in Excel.
- NPV: The correct NPV formula in Excel uses the NPV function to calculate
the present value of a series of future cash flows and subtracts the initial
investment.
- IRR: Use the IRR function in Excel to calculate a project's internal rate of
return. The internal rate of return is the discount rate that makes the net
present value equal to zero.
- Depreciation: Excel offers five different depreciation functions. We consider
an asset with an initial cost of $10,000, a salvage value (residual value) of
$1000 and a useful life of 10 periods (years).
- Profit Margin: Calculating gross profit margin, operating profit margin and
net profit margin in Excel is easy. Simply use the formulas explained on this
page.
8. Statistical
- Average: The AVERAGE function in Excel calculates the average (arithmetic
mean) of a group of numbers.
- Negative Numbers to Zero: A clever Excel trick to change negative numbers
to zero but leave positive numbers unchanged.
- Random Numbers: Excel has two very useful functions when it comes to
generating random numbers. RAND and RANDBETWEEN.
- Rank: The RANK function in Excel returns the rank of a number in a list of
numbers. Use RANK.AVG to return the average rank if more than one
number has the same rank.
- Percentiles and Quartiles: This example teaches you how to use
PERCENTILE and QUARTILE in Excel.
- Box and Whisker Plot: This example teaches you how to create a box and
whisker plot in Excel. A box and whisker plot shows the minimum value, first
quartile, median, third quartile and maximum value of a data set.
- AverageIf: The AVERAGEIF function in Excel calculates the average of cells
that meet one criteria. AVERAGEIFS calculates the average of cells that meet
multiple criteria.
- Forecast: The FORECAST.LINEAR function in Excel predicts a future value
along a linear trend. The FORECAST.ETS function in Excel predicts a future
value using Exponential Triple Smoothing, which takes into account
seasonality.
- MaxIfs and MinIfs: Use MAXIFS and MINIFS in Excel 2016 or later to find the
maximum and minimum value based on one criteria or multiple criteria.
- Weighted Average: To calculate a weighted average in Excel, simply use
SUMPRODUCT and SUM.
- Mode: Use the MODE function in Excel to find the most frequently occurring
number in a list of numbers. Use MODE.MULT to find multiple modes.
- Standard Deviation: This page explains how to calculate the standard
deviation based on the entire population using the STDEV.P function in Excel
and how to estimate the standard deviation based on a sample using the
STDEV.S function in Excel.
- Frequency: The FREQUENCY function in Excel calculates how often values
occur within the ranges you specify in a bin table.
9. Round
- Chop off Decimals: This example illustrates two functions to chop off
decimals in Excel. INT and TRUNC.
- Nearest Multiple: This example illustrates three functions to round numbers
to a multiple of x in Excel. MROUND, CEILING and FLOOR.
- Even and Odd: Use EVEN and ODD in Excel to round numbers. Use ISEVEN
or ISODD in Excel to determine if a number is even or odd.
- Mod: The MOD function in Excel gives the remainder of a division. You can
use the MOD (Modulus) function to determine whether a number is divisible
by another number or to check if a number is even or odd.
- Rounding Times: Use MROUND in Excel to round a time to the nearest 15
minutes, the nearest 30 minutes, the nearest hour, etc.
10. Formula Errors
- IfError: Use the IFERROR function in Excel to return an alternative result,
such as text, when a formula evaluates to an error.
- IsError: This example illustrates the ISERROR function in Excel.
- Aggregate: Excel functions such as SUM, COUNT, LARGE and MAX don't
work if a range includes errors. However, you can easily use the AGGREGATE
function to fix this.
- Circular Reference: A circular reference in Excel occurs when a formula
directly or indirectly refers to its own cell. This is not possible.

- Formula Auditing: Formula auditing in Excel allows you to display the


relationship between formulas and cells. The example below helps you
master Formula Auditing quickly and easily.
- Sum Range with Errors: This example shows you how to create an array
formula that sums a range with errors. You can also use the AGGREGATE
function to sum a range with errors.
- Floating Point Errors: Excel stores and calculates floating point numbers.
Sometimes, the result of a formula is a very close approximation.
- IFNA: Use the IFNA function in Excel to replace a #N/A error with a friendly
message. The IFNA function only catches #N/A errors.
11. Array Formulas
- Count Errors: This example shows you how to create an array formula that
counts the number of errors in a range.
- Count Unique Values: This example shows you how to create an array
formula that counts unique values. Use COUNTA and UNIQUE to count unique
values in Excel 365/2021.

- 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.

- Regression: This example teaches you how to run a linear regression


analysis in Excel and how to interpret the Summary Output.

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.

- Use Relative References: By default, Excel records macros in absolute


mode. However, sometimes it is useful to record macros in relative mode.
- FormulaR1C1: This example illustrates the difference between A1, R1C1
and R[1]C[1] style in Excel VBA.
- Add a Macro to the Toolbar: If you use an Excel macro frequently, you can
add it to the Quick Access Toolbar. This way you can quickly access your
macro.
- Enable Macros: Enable macros in Excel when the message bar appears.
Change your macro security settings in the Trust Center. To create macros,
turn on the Developer tab.
- Protect Macro: Just like you can password protect workbooks and
worksheets, you can password protect a macro in Excel from being viewed
(and executed).
2. MsgBox
- MsgBox Function: The MsgBox function in Excel VBA can return a result
while a simple MsgBox cannot.
- InputBox Function: You can use the InputBox function in Excel VBA to
prompt the user to enter a value.

3. Workbook and Worksheet Object


- Path and FullName: The Path property in Excel VBA returns the complete,
saved path to the workbook (Excel file). The FullName property in Excel VBA
returns the complete, saved path, including the name of the workbook.
- Close and Open: The Close method in Excel VBA is used to close workbooks.
The Open method allows you to open existing workbooks.
- Loop through Books and Sheets: We will look at a program in Excel VBA
that loops through all open workbooks and worksheets, and displays all the
names.
- Sales Calculator: Learn how to create a program in Excel VBA that
calculates the total sales of each employee over a period of three years.
- Files in a Directory: Use Excel VBA to loop through all closed workbooks in a
directory and display the names of their worksheets.
- Import Sheets: In this example, we will create a VBA macro that imports
sheets from other Excel files into one Excel file.

- 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.

- Complex Calculations: Learn how to create a program in Excel VBA that


calculates any term Tk and summation of terms up to N.
- Possible Football Matches: We will look at a program in Excel VBA that
shows a print preview of all the possible football matches from a list of
teams.
- Knapsack Problem: Learn how to create a program in Excel VBA that solves
a small instance of a knapsack problem.
8. Macro Errors
- Debugging: This example teaches you how to debug code in Excel VBA.

- 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.

- Custom Average Function: Learn how to create a User Defined Function


that calculates the average of a randomly selected range excluding one or
more values that are outliers and shouldn't be averaged.
- Volatile Functions: By default, UDFs (User Defined Functions) in Excel VBA
are not volatile. They are only recalculated when any of the function's
arguments change. A volatile function will be recalculated whenever
calculation occurs in any cells on the worksheet.
- ByRef and ByVal: You can pass arguments to a procedure (function or sub)
by reference or by value. By default, Excel VBA passes arguments by
reference.
14. Application Object
- StatusBar: The StatusBar property of the Application object in Excel VBA
can be used to indicate the progress of a lengthy macro. This way, you can
let the user know that a macro is still running.
- Read Data from Text File: Use Excel VBA to read data from a text file. This
file contains some geographical coordinates we want to import into Excel.
- Write Data to Text File: Use Excel VBA to write an Excel range to a CSV
(comma-separated-values) text file.
- Vlookup: Use the WorksheetFunction property in Excel VBA to access the
VLOOKUP function. All you need is a single code line.

15. ActiveX Controls


- Text Box: A text box is an empty field where a user can fill in a piece of
text. To create a text box in Excel VBA, execute the following steps.
- List Box: Use Excel VBA to place a list box on your worksheet. A list box is a
list from where a user can select an item.
- Combo Box: A combo box is a drop-down list from where a user can select
an item or fill in his/her own choice.
- Check Box: A check box is a field which can be checked to store
information. To create a check box in Excel VBA, execute the following steps.
- Option Buttons: If you have more than one option button, only one of the
option buttons can be selected.
- Spin Button: A spin button can be used to increment a number in a cell.
- Loan Calculator: This page teaches you how to create a simple loan
calculator in Excel VBA. The worksheet contains the following ActiveX
controls: two scrollbars and two option buttons.
16. Userform
- Userform and Ranges: You can use a RefEdit control in Excel VBA to get a
range from a user. The Userform we are going to create colors the minimum
value of the range stored in the RefEdit control.
- Currency Converter: Use Excel VBA to create a Userform that converts any
amount from one currency into another.
- Progress Indicator: Learn how to create a progress indicator in Excel VBA.
We've kept the progress indicator as simple as possible, yet it looks
professional. Are you ready?
- Multiple List Box Selections: The MultiSelect property in Excel VBA allows a
user to select multiple items in a list box.
- Multicolumn Combo Box: Learn how to create a program in Excel VBA which
creates a Userform that contains a multicolumn combo box.
- Dependent Combo Boxes: This page illustrates how to create a Userform
that contains dependent combo boxes.
- Loop through Controls: With just a few lines of code, we can easily loop
through controls on an Excel VBA Userform.
- Controls Collection: When creating Userforms in Excel VBA, you can use the
Controls collection to easily loop through controls and set a property of each
control to a specific value.
- Userform with Multiple Pages: Learn how to create a program in Excel VBA
which creates a Userform that contains multiple pages. This userform also
contains images.

You might also like