Download Article
Download Article
Are you new to Microsoft Excel and need to work on a spreadsheet? Excel is so overrun with useful and complicated features that it might seem impossible for a beginner to learn. But don’t worry—once you learn a few basic tricks, you’ll be entering, manipulating, calculating, and graphing data in no time! This wikiHow tutorial will introduce you to the most important features and functions you’ll need to know when starting out with Excel, from entering and sorting basic data to writing your first formulas.
Things You Should Know
- Use Quick Analysis in Excel to perform quick calculations and create helpful graphs without any prior Excel knowledge.
- Adding your data to a table makes it easy to sort and filter data by your preferred criteria.
- Even if you’re not a math person, you can use basic Excel math functions to add, subtract, find averages and more in seconds.
-
1
Create or open a workbook. When people refer to «Excel files,» they are referring to workbooks, which are files that contain one or more sheets of data on individual tabs. Each tab is called a worksheet or spreadsheet, both of which are used interchangeably. When you open Excel, you’ll be prompted to open or create a workbook.
- To start from scratch, click Blank workbook. Otherwise, you can open an existing workbook or create a new one from one of Excel’s helpful templates, such as those designed for budgeting.
-
2
Explore the worksheet. When you create a new blank workbook, you’ll have a single worksheet called Sheet1 (you’ll see that on the tab at the bottom) that contains a grid for your data. Worksheets are made of individual cells that are organized into columns and rows.
- Columns are vertical and labeled with letters, which appear above each column.
- Rows are horizontal and are labeled by numbers, which you’ll see running along the left side of the worksheet.
- Every cell has an address which contains its column letter and row number. For example, the top-left cell in your worksheet’s address is A1 because it’s in column A, row 1.
- A workbook can have multiple worksheets, all containing different sets of data. Each worksheet in your workbook has a name—you can rename a worksheet by right-clicking its tab and selecting Rename.
- To add another worksheet, just click the + next to the worksheet tab(s).
Advertisement
-
3
Save your workbook. Once you save your workbook once, Excel will automatically save any changes you make by default.[1]
This prevents you from accidentally losing data.- Click the File menu and select Save As.
- Choose a location to save the file, such as on your computer or in OneDrive.
- Type a name for your workbook. All workbooks will automatically inherit the the .XLSX file extension.
- Click Save.
Advertisement
-
1
Click a cell to select it. When you click a cell, it will highlight to indicate that it’s selected.
- When you type something into a cell, the input text is called a value. Entering data into Excel is as simple as typing values into each cell.
- When entering data, the first row of your worksheet (e.g., A1, B1, C1) is typically used as headers for each column. This is helpful when creating graphs or tables which require labels.
- For example, if you’re adding a list of dates in column A, you might click cell A1 and type Date into the cell as the column header.
-
2
Type a word or number into the cell. As you’re typing, you’ll see the letters and/or numbers appear in the cell, as well as in the formula bar at the top of the worksheet.
- When you start practicing more advanced Excel features like creating formulas, this bar will come in handy.
- You can also copy and paste text from other applications into your worksheet, tables from PDFs and the web.
-
3
Press ↵ Enter or ⏎ Return. This enters the data into the cell and moves to the next cell in the column.
-
4
Automatically fill columns based on existing data. Let’s say you want to make a list of consecutive dates or numbers. Or what if you want to fill a column with many of the same values that follow a pattern? As long as Excel can recognize some sort of pattern in your data, such as a particular order, you can use Autofill to automatically populate data into the rest of your column. Here’s a trick to see it in action.
- In a blank column, type 1 into the first cell, 2 into the second cell, and then 3 into the third cell.
- Hover your mouse cursor over the bottom-right corner of the last cell in your series—it will turn to a crosshair.
- Click and drag the crosshair down the column, then release the mouse button once you’ve gone down as far as you like. By default, this will fill the remaining cells with the value of the selected cell—at this point, you’ll probably have something like 1, 2, 3, 3, 3, 3, 3, 3.
- Click the small icon at the bottom-right corner of the filled data to open AutoFill options, and select Fill Series to automatically detect the series or pattern. Now you’ll have a list of consecutive numbers. Try this cool feature out with different patterns!
- Once you get the hang of AutoFill, you’ll have to try flash fill, which you can use to join two columns of data into a single merged column.
-
5
Adjust the column sizes so you can see all of the values. Sometimes typing long values into a cell hides the value and displays hash symbols ### instead of what you’ve typed. If you want to be able to see everything, you can snap the cell contents to the width of the widest cell. For example, let’s say we have some long values in column B:
- To expand the contents of column B, hover the cursor over the dividing line between the B and C at the top of the worksheet—once your cursor is right on the line, it will turn to two arrows pointing in either direction.[2]
- Click and drag the separator until the column is wide enough to accommodate your data, or just double-click the separator to instantly snap the column to the size of the widest value.
- To expand the contents of column B, hover the cursor over the dividing line between the B and C at the top of the worksheet—once your cursor is right on the line, it will turn to two arrows pointing in either direction.[2]
-
6
Wrap text in a cell. If your longer values are now awkwardly long, you can enable text wrapping in one or more cells. Just click a cell (or drag the mouse to select multiple cells), click the Home tab, and then click Wrap Text on the toolbar.
-
7
Edit a cell value. If you need to make a change to a cell, you can double-click the cell to activate the cursor, and then make any changes you need. When you’re finished, just press Enter or Return again.
- To delete the contents of a cell, click the cell once and press delete on your keyboard.
-
8
Apply styles to your data. Whether you want to highlight certain values with color so they stand out or just want to make your data look pretty, changing the colors of cells and their containing values is easy—especially if you’re used to Microsoft Word:
- Select a cell, column, row, or multiple cells at once.
- On the Home tab, click Cell Styles if you’d like to quickly apply quick color styles.
- If you’d rather use more custom options, right-click the selected cell(s) and select Format Cells. Then, use the colors on the Fill tab to customize the cell’s background, or the colors on the Font tab for value colors.
-
9
Apply number formatting to cells containing numbers. If you have data that contains numbers such as prices, measurements, dates, or times, you can apply number formatting to the data so it will display consistently.[3]
By default, the number format is General, which means numbers display exactly as you type them.- Select the cell you want to format. If you’re working with an entire column or row, you can just click the column letter or row number to select the whole thing.
- On the Home tab, click the drop-down menu at the top-center—it’ll say General by default, unless you selected cells that Excel recognizes as a different type of number like Currency or Time.
- Choose one of the formatting options in the list, such as Short Date or Percentage, or click More Number Formats at the bottom to expand all options (we recommend this!).
- If you selected More Number Formats, the Format Cells dialog will expand to the Number tab, where you’ll see several categories for number types.
- Select a category, such as Currency if working with money, or Date if working with dates. Then, choose your preferences, such as a currency symbol and/or decimal places.
- Click OK to apply your formatting.
Advertisement
-
1
Select all of the data you’ve entered so far. Adding your data to a table is the easiest way to work with and analyze data.[4]
Start by highlighting the values you’ve entered so far, including your column headers. Tables also make it easy to sort and filter your data based on values.- Tables traditionally apply different or alternating colors to every other row for easy viewing. Many table options also add borders between cells and/or columns and rows.
-
2
Click Format as Table. You’ll see this at the top-center part of the Home tab.[5]
-
3
Select a table style. Choose any of Excel’s default table styles to get started. You’ll see a small window titled «Create Table» once selected.
- Once you get the hang of tables, you can return here to customize your table further by selecting New Table Style.
-
4
Make sure «My table has headers» is selected and click OK. This tells Excel to turn your column headers into drop-down menus that you can easily sort and filter. Once you click OK, you’ll see that your data now has a color scheme and drop-down menus.
-
5
Click the drop-down menu at the top of a column. Now you’ll see options for sorting that column, as well as several options for filtering all of your data based on its values.
-
6
Choose which data to display based on values in this column. The simplest way to do this is to uncheck the values you don’t want to display—if you uncheck a particular date, for example, you’ll prevent rows that contain the selected date in from appearing in your data. You can also use Text Filters or Number Filters, depending on the type of data in the column:
- If you chose a numerical column, select Number Filters, then choose an option like Greater Than… or Does Not Equal to be extra specific about which values to hide.
- For text columns, you can choose Text Filters, where you can specify things like Begins with or Contains.
- You can also filter by cell color.
-
7
Click OK. Your data is now filtered based on your selections. You’ll also see a small funnel icon in the drop-down menu, which indicates that the data is filtering out certain values.
- To unfilter your data, click the funnel icon, click Clear filter from (column name), and then click OK.
- You can also filter columns that aren’t in tables. Just select a column and click Filter on the Data tab to add a drop-down to that column.
-
8
Sort your data in ascending or descending order. Click the drop-down arrow at the top of a column to view sorting options—these allow you to sort all of your data in order based on the current column.
- If you’re working with numbers, click Smallest to Largest to sort in ascending order, or Largest to Smallest for descending order.[6]
- If you’re working with text values, Sort A to Z will sort in ascending order, while Sort Z to A will sort in reverse.
- When it comes to sorting dates and times, Sort Oldest to Newest will sort with the earliest date at the top and the oldest date at the bottom, and Newest to Oldest displays the dates in descending order.
- When you sort a column, all other columns in the table adjust based on the sort.
- If you’re working with numbers, click Smallest to Largest to sort in ascending order, or Largest to Smallest for descending order.[6]
Advertisement
-
1
Select the data in your worksheet. Excel’s Quick Analysis feature is the easiest way to perform basic calculations (including totals, averages, and counts) and create meaningful tables or graphs without the need for advanced Excel knowledge.[7]
Use your mouse to select your data (including your column headers) to get started. -
2
Click the Quick Analysis icon. This is the small icon that pops up at the bottom-right corner of your selection. It looks like a window with some colored lines.
-
3
Select an analysis type. You’ll see several tabs running along the top of the window, each of which gives you different option for visualizing your data:
- For math calculations, click the Totals tab, where you can select Sum, Average, Count, %Total, or Running Total. You’ll be able to choose whether to display the results at the bottom of each column or to the right.
- To create a chart, click the Charts tab, then select a chart to visualize your data. Before you settle on a chart, just hover the cursor over each option to see a preview.
- To add quick chart data to individual cells, click the Sparklines tab and choose a format. Again, you can hover the cursor over each option to see a preview.
- To instantly apply conditional formatting (which is usually a little more complex in Excel) based on your data, use the Formatting tab. Here you can choose an option like Color or Data Bars, which apply colors to your data based on trends.
Advertisement
-
1
Quickly add data with AutoSum. AutoSum is a built-in Excel function that makes it easy to find the total of one or more columns in a few clicks. Functions or formulas that perform calculations and other tasks based on the values of cells. When you use a function to get something done, you’re creating a formula, which is like a math equation. If you have a column or row of numbers you want to add:
- Click the cell below the numbers you want to add (if a column) or to the right (if a row).[8]
- On the Home tab, click AutoSum toward the upper-right corner of the app. A formula beginning with =SUM(cell+cell) will appear in the field, and a dotted line will surround the numbers you’re adding.
- Press Enter or Return. You should now see the total of the numbers in the selected field. This is here because you created your first formula—which you didn’t have to write by hand!
- If you change any numbers in your data after using AutoSum, the AutoSum value will update automatically.
- Click the cell below the numbers you want to add (if a column) or to the right (if a row).[8]
-
2
Write a simple math formula. AutoSum is just the beginning—Excel is famous for its ability to do all sorts of simple and complex math calculations on data. Fortunately, you don’t have to be a math whiz to create simple formulas to create everyday math formulas, like adding, subtracting, and multiplying. Here’s some basic formulas to get you started:
-
Add: — Type =SUM(cell+cell) (e.g.,
=SUM(A3+B3)
) to add two cells’ values together, or type =SUM(cell,cell,cell) (e.g.,=SUM(A2,B2,C2)
) to add a series of cell values together.- If you want to add all of the numbers in a whole column (or in a section of a column), type =SUM(cell:cell) (e.g.,
=SUM(A1:A12)
) into the cell you want to use to display the result.
- If you want to add all of the numbers in a whole column (or in a section of a column), type =SUM(cell:cell) (e.g.,
-
Subtract: Type =SUM(cell-cell) (e.g.,
=SUM(A3-B3)
) to subtract one cell value from another cell’s value. -
Divide: Type =SUM(cell/cell) (e.g.,
=SUM(A6/C5)
) to divide one cell’s value by another cell’s value. -
Multiply: Type =SUM(cell*cell) (e.g.,
=SUM(A2*A7)
) to multiply two cell values together.
-
Add: — Type =SUM(cell+cell) (e.g.,
Advertisement
-
1
Select a cell for an advanced formula. What if you need to do something more complicated than just adding numbers? Even if you don’t know how to write formulas by hand, you can still create useful formulas that work with your data in various ways. Start by clicking the cell in which you want to display your formula.
-
2
Click the Formulas tab. It’s a tab at the top of the Excel window.
-
3
Explore the Function Library. Several function categories appear in the toolbar, such as Financial, Text, and Math & Trig. Click the options to check out the types of functions available, though they might not make a whole lot of sense just yet.
-
4
Click Insert Function. This option is in the far-left side of the Formulas toolbar. This opens the Insert Function window, which gives you a more detailed breakdown of each function.
-
5
Click a function to learn about it. You can type what you want to do (such as round), or choose a category to filter the list of functions. Then, click any function to read a description of how it works and view its syntax.
- For example, to select the formula for finding the tangent of an angle, you would scroll down and click the TAN option.
-
6
Select a function and click OK. This creates a formula based on the selected function.
-
7
Fill out the function’s formula. When prompted, type in the number or select a cell for which you want to use the formula.
- For example, if you select the TAN function, you’ll type in the number for which you want to find the tangent, or select the cell that contains that number.
- Depending on your selected function, you may need to click through a couple of on-screen prompts.
-
8
Press ↵ Enter or ⏎ Return to run the formula. Doing so applies your function and displays it in your selected cell.
Advertisement
-
1
Set up the chart’s data. If you’re creating a line graph or a bar graph, for example, you’ll want to use one column of cells for the horizontal axis and one column of cells for the vertical axis. The best way to do this is to place your data in a table.
- Typically speaking, the left column is used for the horizontal axis and the column immediately to the right of it represents the vertical axis.
-
2
Select the data in your table. Click and drag your mouse from the top-left cell of the data down to the bottom-right cell of the data.
-
3
Click the Insert tab. It’s a tab at the top of the Excel window.
-
4
Click Recommended Charts. You’ll find this option in the «Charts» section of the Insert toolbar. A window with different chart templates will appear.
-
5
Select a chart template. Click the chart template you want to use based on the type of data you’re working with. If you don’t see a chart type you like, click the All Charts tab to explore by category, such as Pie, Bar, and X Y Scatter.
-
6
Click OK. It’s at the bottom of the window. This creates your chart.
-
7
Use the Chart Design tab to customize your chart. Any time you click your chart, the Chart Design tab will appear at the top of Excel. You can adjust the chart style here, change colors, and add additional elements.
-
8
Double-click a chart element to manage it in the Format panel. When you double-click something on your chart, such as a value, line, or bar, you’ll see options you can edit in the panel on the right side of excel. Here you can change the axis labels, alignment, and legend data.
Advertisement
Add New Question
-
Question
How do you add a check mark or an X mark to a cell?
You can go into Insert, then Symbol, and choose the symbol you want. After that, you can just copy and paste the symbol from one cell to another.
-
Question
Can I add work sheets on Excel?
Yes. At the bottom left of the Excel you will see the list of sheets. To the left of those sheets you will find a «+» sign. Click on it.
-
Question
How do I move cell contents to another cell?
Highlight the cell, right-click, and click Copy. Click destination cell, right-click and Paste.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
Thanks for submitting a tip for review!
References
About This Article
Article SummaryX
1. Purchase and install Microsoft Office.
2. Enter data into individual cells.
3. Format cells based on certain criteria.
4. Organize data into rows and columns.
5. Perform math operations using formulas.
6. Use the Formulas tab to find additional formulas.
7. Use data to create charts.
8. Import data from other sources.
Did this summary help you?
Thanks to all authors for creating a page that has been read 646,684 times.
Reader Success Stories
-
«I am applying for a job that requires comprehensive knowledge of Excel. Well, I don’t have it, but this article…» more
Is this article up to date?
A spreadsheet is a computer application that is designed to add, display, analyze, organize, and manipulate data arranged in rows and columns. It is the most popular application for accounting, analytics, data presentation, etc. Or in other words, spreadsheets are scalable grid-based files that are used to organize data and perform calculations. People all across the world use spreadsheets to create tables for personal and business usage. You can also use the tool’s features and formulas to help you make sense of your data. You could, for example, track data in a spreadsheet and see sums, differences, multiplication, division, and fill dates automatically, among other things. Microsoft Excel, Google sheets, Apache open office, LibreOffice, etc are some spreadsheet software. Among all these software, Microsoft Excel is the most commonly used spreadsheet tool and it is available for Windows, macOS, Android, etc.
A collection of spreadsheets is known as a workbook. Every Excel file is called a workbook. Every time when you start a new project in Excel, you’ll need to create a new workbook. There are several methods for getting started with an Excel workbook. To create a new worksheet or access an existing one, you can either start from scratch or utilize a pre-designed template.
A single Excel worksheet is a tabular spreadsheet that consists of a matrix of rectangular cells grouped in rows and columns. It has a total of 1,048,576 rows and 16,384 columns, resulting in 17,179,869,184 cells on a single page of a Microsoft Excel spreadsheet where you may write, modify, and manage your data.
In the same way as a file or a book is made up of one or more worksheets that contain various types of related data, an Excel workbook is made up of one or more worksheets. You can also create and save an endless number of worksheets. The major purpose is to collect all relevant data in one place, but in many categories (worksheet).
Feature of spreadsheet
As we know that there are so many spreadsheet applications available in the market. So these applications provide the following basic features:
1. Rows and columns: Rows and columns are two distinct features in a spreadsheet that come together to make a cell, a range, or a table. In general, columns are the vertical portion of an excel worksheet, and there can be 256 of them in a worksheet, whereas rows are the horizontal portion, and there can be 1048576 of them.
The color light green is used to highlight Row 3 while the color green is used to highlight Column B. Each column has 1048576 rows and each row has 256 columns.
2. Formulas: In spreadsheets, formulas process data automatically. It takes data from the specified area of the spreadsheet as input then processes that data, and then displays the output into the new area of the spreadsheet according to where the formula is written. In Excel, we can use formulas simply by typing “=Formula Name(Arguments)” to use predefined Excel formulas. When you write the first few characters of any formula, Excel displays a drop-down menu of formulas that match that character sequence. Some of the commonly used formulas are:
- =SUM(Arg1: Arg2): It is used to find the sum of all the numeric data specified in the given range of numbers.
- =COUNT(Arg1: Arg2): It is used to count all the number of cells(it will count only number) specified in the given range of numbers.
- =MAX(Arg1: Arg2): It is used to find the maximum number from the given range of numbers.
- =MIN(Arg1: Arg2): It is used to find the minimum number from the given range of numbers.
- =TODAY(): It is used to find today’s date.
- =SQRT(Arg1): It is used to find the square root of the specified cell.
For example, you can use the formula to find the average of the integers in column C from row 2 to row 7:
= AVERAGE(D2:D7)
The range of values on which you want to average is defined by D2:D6. The formula is located near the name field on the formula tab.
We wrote =AVERAGE(D2:D6) in cell D9, therefore the average becomes (2 + 3 + 4 + 5 + 6 + 7)/6 = 27/6 = 4.5. So you can quickly create a workbook, work on it, browse through it, and save it in this manner.
3. Function: In spreadsheets, the function uses a specified formula on the input and generates output. Or in other words, functions are created to perform complicated math problems in spreadsheets without using actual formulas. For example, you want to find the total of the numeric data present in the column then use the SUM function instead of adding all the values present in the column.
4. Text Manipulation: The spreadsheet provides various types of commands to manipulate the data present in it.
5. Pivot Tables: It is the most commonly used feature of the spreadsheet. Using this table users can organize, group, total, or sort data using the toolbar. Or in other words, pivot tables are used to summarize lots of data. It converts tons of data into a few rows and columns.
Use of Spreadsheets
The use of Spreadsheets is endless. It is generally used with anything that contains numbers. Some of the common use of spreadsheets are:
- Finance: Spreadsheets are used for financial data like it is used for checking account information, taxes, transaction, billing, budgets, etc.
- Forms: Spreadsheet is used to create form templates to manage performance review, timesheets, surveys, etc.
- School and colleges: Spreadsheets are most commonly used in schools and colleges to manage student’s data like their attendance, grades, etc.
- Lists: Spreadsheets are also used to create lists like grocery lists, to-do lists, contact detail, etc.
- Hotels: Spreadsheets are also used in hotels to manage the data of their customers like their personal information, room numbers, check-in date, check-out date, etc.
Components of Spreadsheets
The basic components of spreadsheets are:
1. TitleBar: The title bar displays the name of the spreadsheet and application.
2. Toolbar: It displays all the options or commands available in Excel for use.
3. NameBox: It displays the address of the current or active cell.
4. Formula Bar: It is used to display the data entered by us in the active cell. Also, this bar is used to apply formulas to the data of the spreadsheet.
5. Column Headings: Every excel spreadsheet contains 256 columns and each column present in the spreadsheet is named by letters or a combination of letters.
6. Row Headings: Every excel spreadsheet contains 65,536 rows and each row present in the spreadsheet is named by a number.
7. Cell: In a spreadsheet, everything like a numeric value, functions, expressions, etc., is recorded in the cell. Or we can say that an intersection of rows and columns is known as a cell. Every cell has its own name or address according to its column and rows and when the cursor is present on the first cell then that cell is known as an active cell.
8. Cell referring: A cell reference, also known as a cell address, is a way for describing a cell on a worksheet that combines a column letter and a row number. We can refer to any cell on the worksheet using cell references (in excel formulae). As shown in the above image the cell in column A and row 1 is referred to as A1. Such notations can be used in any formula or to duplicate the value of one cell to another (by using = A1).
9. Navigation buttons: A spreadsheet contains first, previous, next, and last navigation buttons. These buttons are used to move from one worksheet to another workbook.
10. Sheet tabs: As we know that a workbook is a collection of worksheets. So this tab contains all the worksheets present in the workbook, by default it contains three worksheets but you can add more according to your requirement.
Create a new Spreadsheet or Workbook
To create a new spreadsheet follow the following steps:
Step 1: Click on the top-left, Microsoft office button and a drop-down menu appear.
Step 2: Now select New from the menu.
Step 3: After selecting the New option a New Workbook dialogue box will appear and then in Create tab, click on the blank Document.
A new blank worksheet is created and is shown on your screen.
Note: When you open MS Excel on your computer, it creates a new Workbook for you.
Saving The Workbook
In Excel we can save a workbook using the following steps:
Step 1: Click on the top-left, Microsoft office button and we get a drop-down menu:
Step 2: Now Save or Save As are the options to save the workbook, so choose one.
- Save As: To name the spreadsheet and then save it to a specific location. Select Save As if you wish to save the file for the first time, or if you want to save it with a new name.
- Save: To save your work, select Save/ click ctrl + S if the file has already been named.
So this is how you can save a workbook in Excel.
Inserting text in Spreadsheet
Excel consists of many rows and columns, each rectangular box in a row or column is referred to as a Cell. So, the combination of a column letter and a row number can be used to find a cell address on a worksheet or spreadsheet. We can refer to any cell in the worksheet using these addresses (in excel formulas). The name box on the top left(below the Home tab) displays the cell’s address whenever you click the cell.
To insert the data into the cell follow the following steps:
Step 1: Go to a cell and click on it
Step 2: By typing something on the keyboard, you can insert your data (In that selected cell).
Whatever text you type displays in the formula bar as well (for that cell).
Edit/ Delete Cell Contents in the Spreadsheet
To delete cell content follow the following steps:
Step 1: To alter or delete the text in a cell, first select it.
Step 2: Press the Backspace key on your keyboard to delete and correct text. Alternatively, hit the Delete key to delete the whole contents of a cell. You can also edit and delete text using the formula bar. Simply select the cell and move the pointer to the formula bar.
На чтение 16 мин. Просмотров 14.8k.
Malcolm Gladwell
Мечтатель начинает с чистого листа бумаги и переосмысливает мир
Эта статья содержит полное руководство по использованию Excel
VBA Worksheet в Excel VBA. Если вы хотите узнать, как что-то сделать быстро, ознакомьтесь с кратким руководством к рабочему листу VBA ниже.
Если вы новичок в VBA, то эта статья — отличное место для начала. Мне нравится разбивать вещи на простые термины и объяснять их на простом языке.
Вы можете прочитать статью от начала до конца, так как она написана в логическом порядке. Или, если предпочитаете, вы можете использовать оглавление ниже и перейти непосредственно к теме по вашему выбору.
Содержание
- Краткое руководство к рабочему листу VBA
- Вступление
- Доступ к рабочему листу
- Использование индекса для доступа к рабочему листу
- Использование кодового имени рабочего листа
- Активный лист
- Объявление объекта листа
- Доступ к рабочему листу в двух словах
- Добавить рабочий лист
- Удалить рабочий лист
- Цикл по рабочим листам
- Использование коллекции листов
- Заключение
Краткое руководство к рабочему листу VBA
В следующей таблице приведен краткий обзор различных методов
Worksheet .
Примечание. Я использую Worksheet в таблице ниже, не указывая рабочую книгу, т.е. Worksheets, а не ThisWorkbook.Worksheets, wk.Worksheets и т.д. Это сделано для того, чтобы примеры были понятными и удобными для чтения. Вы должны всегда указывать рабочую книгу при использовании Worksheets . В противном случае активная рабочая книга будет использоваться по умолчанию.
Задача | Исполнение |
Доступ к рабочему листу по имени |
Worksheets(«Лист1») |
Доступ к рабочему листу по позиции слева |
Worksheets(2) Worksheets(4) |
Получите доступ к самому левому рабочему листу |
Worksheets(1) |
Получите доступ к самому правому листу |
Worksheets(Worksheets.Count) |
Доступ с использованием кодового имени листа (только текущая книга) |
Смотри раздел статьи Использование кодового имени |
Доступ по кодовому имени рабочего листа (другая рабочая книга) |
Смотри раздел статьи Использование кодового имени |
Доступ к активному листу | ActiveSheet |
Объявить переменную листа | Dim sh As Worksheet |
Назначить переменную листа | Set sh = Worksheets(«Лист1») |
Добавить лист | Worksheets.Add |
Добавить рабочий лист и назначить переменную |
Worksheets.Add Before:= Worksheets(1) |
Добавить лист в первую позицию (слева) |
Set sh =Worksheets.Add |
Добавить лист в последнюю позицию (справа) |
Worksheets.Add after:=Worksheets(Worksheets.Count) |
Добавить несколько листов | Worksheets.Add Count:=3 |
Активировать рабочий лист | sh.Activate |
Копировать лист | sh.Copy |
Копировать после листа | sh1.Copy After:=Sh2 |
Скопировать перед листом | sh1.Copy Before:=Sh2 |
Удалить рабочий лист | sh.Delete |
Удалить рабочий лист без предупреждения |
Application.DisplayAlerts = False sh.Delete Application.DisplayAlerts = True |
Изменить имя листа | sh.Name = «Data» |
Показать/скрыть лист | sh.Visible = xlSheetHidden sh.Visible = xlSheetVisible sh.Name = «Data» |
Перебрать все листы (For) | Dim i As Long For i = 1 To Worksheets.Count Debug.Print Worksheets(i).Name Next i |
Перебрать все листы (For Each) | Dim sh As Worksheet For Each sh In Worksheets Debug.Print sh.Name Next |
Вступление
Три наиболее важных элемента VBA — это Рабочая книга, Рабочий лист и Ячейки. Из всего кода, который вы пишете, 90% будут включать один или все из них.
Наиболее распространенное использование Worksheet в VBA для доступа к его ячейкам. Вы можете использовать его для защиты, скрытия, добавления, перемещения или копирования листа.
Тем не менее, вы будете в основном использовать его для выполнения некоторых действий с одной или несколькими ячейками на листе.
Использование Worksheets более простое, чем использование рабочих книг. С книгами вам может потребоваться открыть их, найти, в какой папке они находятся, проверить, используются ли они, и так далее. С рабочим листом он либо существует в рабочей книге, либо его нет.
Доступ к рабочему листу
В VBA каждая рабочая книга имеет коллекцию рабочих листов. В этой коллекции есть запись для каждого рабочего листа. Эта коллекция называется просто Worksheets и используется очень похоже на коллекцию Workbooks. Чтобы получить доступ к рабочему листу, достаточно указать имя.
Приведенный ниже код записывает «Привет Мир» в ячейках A1 на листах: Лист1, Лист2 и Лист3 текущей рабочей книги.
Sub ZapisVYacheiku1() ' Запись в ячейку А1 в листе 1, листе 2 и листе 3 ThisWorkbook.Worksheets("Лист1").Range("A1") = "Привет Мир" ThisWorkbook.Worksheets("Лист2").Range("A1") = "Привет Мир" ThisWorkbook.Worksheets("Лист3").Range("A1") = "Привет Мир" End Sub
Коллекция Worksheets всегда принадлежит книге. Если мы не
указываем рабочую книгу, то активная рабочая книга используется по умолчанию.
Sub ZapisVYacheiku1() ' Worksheets относятся к рабочим листам в активной рабочей книге. Worksheets("Лист1").Range("A1") = "Привет Мир" Worksheets("Лист2").Range("A1") = "Привет Мир" Worksheets("Лист3").Range("A1") = "Привет Мир" End Sub
Скрыть рабочий лист
В следующих примерах показано, как скрыть и показать лист.
ThisWorkbook.Worksheets("Лист1").Visible = xlSheetHidden ThisWorkbook.Worksheets("Лист1").Visible = xlSheetVisible
Если вы хотите запретить пользователю доступ к рабочему
листу, вы можете сделать его «очень скрытым». Это означает, что это может быть
сделано видимым только кодом.
' Скрыть от доступа пользователя ThisWorkbook.Worksheets("Лист1").Visible = xlVeryHidden ' Это единственный способ сделать лист xlVeryHidden видимым ThisWorkbook.Worksheets("Лист1").Visible = xlSheetVisible
Защитить рабочий лист
Другой пример использования Worksheet — когда вы хотите защитить его.
ThisWorkbook.Worksheets("Лист1").Protect Password:="Мойпароль" ThisWorkbook.Worksheets("Лист1").Unprotect Password:="Мойпароль"
Индекс вне диапазона
При использовании Worksheets вы можете получить сообщение об
ошибке:
Run-time Error 9 Subscript out of Range
Это означает, что вы пытались получить доступ к рабочему листу, который не существует. Это может произойти по следующим причинам:
- Имя Worksheet , присвоенное рабочим листам, написано неправильно.
- Название листа изменилось.
- Рабочий лист был удален.
- Индекс был большим, например Вы использовали рабочие листы (5), но есть только четыре рабочих листа
- Используется неправильная рабочая книга, например Workbooks(«book1.xlsx»).Worksheets(«Лист1») вместо
Workbooks(«book3.xlsx»).Worksheets («Лист1»).
Если у вас остались проблемы, используйте один из циклов из раздела «Циклы по рабочим листам», чтобы напечатать имена всех рабочих листов коллекции.
Использование индекса для доступа к рабочему листу
До сих пор мы использовали имя листа для доступа к листу.
Указатель относится к положению вкладки листа в рабочей книге. Поскольку
положение может быть легко изменено пользователем, не рекомендуется
использовать это.
В следующем коде показаны примеры использования индекса.
' Использование этого кода является плохой идеей, так как ' позиции листа все время меняются Sub IspIndList() With ThisWorkbook ' Самый левый лист Debug.Print .Worksheets(1).Name ' Третий лист слева Debug.Print .Worksheets(3).Name ' Самый правый лист Debug.Print .Worksheets(.Worksheets.Count).Name End With End Sub
В приведенном выше примере я использовал Debug.Print для печати в Immediate Window. Для просмотра этого окна выберите «Вид» -> «Immediate Window » (Ctrl + G).
Использование кодового имени рабочего листа
Лучший способ получить доступ к рабочему листу —
использовать кодовое имя. Каждый лист имеет имя листа и кодовое имя. Имя листа
— это имя, которое отображается на вкладке листа в Excel.
Изменение имени листа не приводит к изменению кодового имени, что означает, что ссылка на лист по кодовому имени — отличная идея.
Если вы посмотрите в окне свойств VBE, вы увидите оба имени.
На рисунке вы можете видеть, что кодовое имя — это имя вне скобок, а имя листа
— в скобках.
Вы можете изменить как имя листа, так и кодовое имя в окне
свойств листа (см. Изображение ниже).
Если ваш код ссылается на кодовое имя, то пользователь может
изменить имя листа, и это не повлияет на ваш код. В приведенном ниже примере мы
ссылаемся на рабочий лист напрямую, используя кодовое имя.
Sub IspKodImya2() ' Используя кодовое имя листа Debug.Print CodeName.Name CodeName.Range("A1") = 45 CodeName.Visible = True End Sub
Это делает код легким для чтения и безопасным от изменения
пользователем имени листа.
Кодовое имя в других книгах
Есть один недостаток использования кодового имени. Он относится только к рабочим листам в рабочей книге, которая содержит код, т.е. ThisWorkbook.
Однако мы можем использовать простую функцию, чтобы найти
кодовое имя листа в другой книге.
Sub ИспЛист() Dim sh As Worksheet ' Получить рабочий лист под кодовым именем Set sh = SheetFromCodeName("CodeName", ThisWorkbook) ' Используйте рабочий лист Debug.Print sh.Name End Sub ' Эта функция получает объект листа из кодового имени Public Function SheetFromCodeName(Name As String, bk As Workbook) As Worksheet Dim sh As Worksheet For Each sh In bk.Worksheets If sh.CodeName = Name Then Set SheetFromCodeName = sh Exit For End If Next sh End Function
Использование приведенного выше кода означает, что если
пользователь изменит имя рабочего листа, то на ваш код это не повлияет.
Существует другой способ получения имени листа внешней
рабочей книги с использованием кодового имени. Вы можете использовать элемент
VBProject этой Рабочей книги.
Вы можете увидеть, как это сделать, в примере ниже. Я включил это, как дополнительную информацию, я бы рекомендовал использовать метод из предыдущего примера, а не этот.
Public Function SheetFromCodeName2(codeName As String _ , bk As Workbook) As Worksheet ' Получить имя листа из CodeName, используя VBProject Dim sheetName As String sheetName = bk.VBProject.VBComponents(codeName).Properties("Name") ' Используйте имя листа, чтобы получить объект листа Set SheetFromCodeName2 = bk.Worksheets(sheetName) End Function
Резюме кодового имени
Ниже приведено краткое описание использования кодового имени:
- Кодовое имя рабочего листа может быть
использовано непосредственно в коде, например. Sheet1.Range - Кодовое имя будет по-прежнему работать, если имя
рабочего листа будет изменено. - Кодовое имя может использоваться только для
листов в той же книге, что и код. - Везде, где вы видите ThisWorkbook.Worksheets
(«имя листа»), вы можете заменить его кодовым именем рабочего листа. - Вы можете использовать функцию SheetFromCodeName
сверху, чтобы получить кодовое имя рабочих листов в других рабочих книгах.
Активный лист
Объект ActiveSheet ссылается на рабочий лист, который в данный момент активен. Вы должны использовать ActiveSheet только в том случае, если у вас есть особая необходимость ссылаться на активный лист.
В противном случае вы должны указать рабочий лист, который
вы используете.
Если вы используете метод листа, такой как Range, и не
упоминаете лист, он по умолчанию будет использовать активный лист.
' Написать в ячейку A1 в активном листе ActiveSheet.Range("A1") = 99 ' Активный лист используется по умолчанию, если лист не используется Range("A1") = 99
Объявление объекта листа
Объявление объекта листа полезно для того, чтобы сделать ваш
код более понятным и легким для чтения.
В следующем примере показан код для обновления диапазонов
ячеек. Первый Sub не объявляет объект листа. Вторая подпрограмма объявляет
объект листа, и поэтому код намного понятнее.
Sub NeObyavObektList() Debug.Print ThisWorkbook.Worksheets("Лист1").Name ThisWorkbook.Worksheets("Лист1").Range("A1") = 6 ThisWorkbook.Worksheets("Лист1").Range("B2:B9").Font.Italic = True ThisWorkbook.Worksheets("Лист1").Range("B2:B9").Interior.Color = rgbRed End Sub
Sub ObyavObektList() Dim sht As Worksheet Set sht = ThisWorkbook.Worksheets("Лист1") sht.Range("A1") = 6 sht.Range("B2:B9").Font.Italic = True sht.Range("B2:B9").Interior.Color = rgbRed End Sub
Вы также можете использовать ключевое слово With с объектом
листа, как показано в следующем примере.
Sub ObyavObektListWith() Dim sht As Worksheet Set sht = ThisWorkbook.Worksheets("Лист1") With sht .Range("A1") = 6 .Range("B2:B9").Font.Italic = True .Range("B2:B9").Interior.Color = rgbRed End With End Sub
Доступ к рабочему листу в двух словах
Из-за множества различных способов доступа к рабочему листу вы можете быть сбитыми с толку. Так что в этом разделе я собираюсь разбить его на простые термины.
- Если вы хотите использовать тот лист, который активен в данный момент, используйте ActiveSheet.
ActiveSheet.Range("A1") = 55
2. Если лист находится в той же книге, что и код, используйте кодовое имя.
3. Если рабочая таблица находится в другой рабочей книге, сначала получите рабочую книгу, а затем получите рабочую таблицу.
' Получить рабочую книгу Dim wk As Workbook Set wk = Workbooks.Open("C:ДокументыСчета.xlsx", ReadOnly:=True) ' Затем получите лист Dim sh As Worksheet Set sh = wk.Worksheets("Лист1")
Если вы хотите защитить пользователя от изменения имени листа, используйте функцию SheetFromCodeName из раздела «Имя кода».
' Получить рабочую книгу Dim wk As Workbook Set wk = Workbooks.Open("C:ДокументыСчета.xlsx", ReadOnly:=True) ' Затем получите лист Dim sh As Worksheet Set sh = SheetFromCodeName("sheetcodename",wk)
Добавить рабочий лист
Примеры в этом разделе показывают, как добавить новую
рабочую таблицу в рабочую книгу. Если вы не предоставите никаких аргументов для
функции Add, то новый
рабочий лист будет помещен перед активным рабочим листом.
Когда вы добавляете рабочий лист, он создается с именем по умолчанию, например «Лист4». Если вы хотите изменить имя, вы можете легко сделать это, используя свойство Name.
В следующем примере добавляется новый рабочий лист и изменяется имя на «Счета». Если лист с именем «Счета» уже существует, вы получите сообщение об ошибке.
Sub DobavitList() Dim sht As Worksheet ' Добавляет новый лист перед активным листом Set sht = ThisWorkbook.Worksheets.Add ' Установите название листа sht.Name = "Счета" ' Добавляет 3 новых листа перед активным листом ThisWorkbook.Worksheets.Add Count:=3 End Sub
В предыдущем примере вы добавляете листы по отношению к
активному листу. Вы также можете указать точную позицию для размещения листа.
Для этого вам нужно указать, какой лист новый лист должен
быть вставлен до или после. Следующий код показывает вам, как это сделать.
Sub DobavitListPervPosl() Dim shtNew As Worksheet Dim shtFirst As Worksheet, shtLast As Worksheet With ThisWorkbook Set shtFirst = .Worksheets(1) Set shtLast = .Worksheets(.Worksheets.Count) ' Добавляет новый лист на первую позицию в книге Set shtNew = Worksheets.Add(Before:=shtFirst) shtNew.Name = "FirstSheet" ' Добавляет новый лист к последней позиции в книге Set shtNew = Worksheets.Add(After:=shtLast) shtNew.Name = "LastSheet" End With End Sub
Удалить рабочий лист
Чтобы удалить лист, просто вызовите Delete.
Dim sh As Worksheet Set sh = ThisWorkbook.Worksheets("Лист12") sh.Delete
Excel отобразит предупреждающее сообщение при удалении листа. Если вы хотите скрыть это сообщение, вы можете использовать код ниже:
Application.DisplayAlerts = False sh.Delete Application.DisplayAlerts = True
Есть два аспекта, которые нужно учитывать при удалении таблиц.
Если вы попытаетесь получить доступ к рабочему листу после
его удаления, вы получите ошибку «Subscript out of Range», которую мы видели в
разделе «Доступ к рабочему листу».
Dim sh As Worksheet Set sh = ThisWorkbook.Worksheets("Лист2") sh.Delete ' Эта строка выдаст «Subscript out of Range», так как «Лист2» не существует Set sh = ThisWorkbook.Worksheets("Лист2")
Вторая проблема — когда вы назначаете переменную листа. Если вы попытаетесь использовать эту переменную после удаления листа, вы получите ошибку автоматизации, подобную этой:
Run-Time error -21147221080 (800401a8′) Automation Error
Если вы используете кодовое имя рабочего листа, а не
переменную, это приведет к сбою Excel,
а не к ошибке автоматизации.
В следующем примере показано, как происходят ошибки автоматизации.
sh.Delete ' Эта строка выдаст ошибку автоматизации Debug.Assert sh.Name
Если вы назначите переменную Worksheet действительному рабочему листу, он будет работать нормально.
sh.Delete ' Назначить sh на другой лист Set sh = Worksheets("Лист3") ' Эта строка будет работать нормально Debug.Assert sh.Name
Цикл по рабочим листам
Элемент «Worksheets» — это набор рабочих листов, принадлежащих рабочей книге. Вы можете просмотреть каждый лист в коллекции рабочих листов, используя циклы «For Each» или «For».
В следующем примере используется цикл For Each.
Sub CiklForEach() ' Записывает «Привет Мир» в ячейку A1 для каждого листа Dim sht As Worksheet For Each sht In ThisWorkbook.Worksheets sht.Range("A1") = "Привет Мир" Next sht End Sub
В следующем примере используется стандартный цикл For.
Sub CiklFor() ' Записывает «Привет Мир» в ячейку A1 для каждого листа Dim i As Long For i = 1 To ThisWorkbook.Worksheets.Count ThisWorkbook.Worksheets(i).Range("A1") = "Привет Мир" Next sht End Sub
Вы видели, как получить доступ ко всем открытым рабочим книгам и как получить доступ ко всем рабочим листам в ThisWorkbook. Давайте сделаем еще один шаг вперед — узнаем, как получить доступ ко всем рабочим листам во всех открытых рабочих книгах.
Примечание. Если вы используете код, подобный этому, для записи на листы, то сначала сделайте резервную копию всего, так как в итоге вы можете записать неверные данные на все листы.
Sub NazvVsehStr() ' Печатает рабочую книгу и названия листов для ' всех листов в открытых рабочих книгах Dim wrk As Workbook Dim sht As Worksheet For Each wrk In Workbooks For Each sht In wrk.Worksheets Debug.Print wrk.Name + ":" + sht.Name Next sht Next wrk End Sub
Использование коллекции листов
Рабочая книга имеет еще одну коллекцию, похожую на Worksheets под названием Sheets. Это иногда путает пользователей. Чтобы понять, в первую очередь, вам нужно знать о типе листа, который является диаграммой.
В Excel есть возможность создать лист, который является диаграммой. Для этого нужно:
- Создать диаграмму на любом листе.
- Щелкнуть правой кнопкой мыши на графике и выбрать «Переместить».
- Выбрать первый вариант «Новый лист» и нажмите «ОК».
Теперь у вас есть рабочая книга, в которой есть типовые листы и лист-диаграмма.
- Коллекция «Worksheets » относится ко всем рабочим листам в рабочей книге. Не включает в себя листы типа диаграммы.
- Коллекция Sheets относится ко всем листам, принадлежащим книге, включая листы типовой диаграммы.
Ниже приведены два примера кода. Первый проходит через все
листы в рабочей книге и печатает название листа и тип листа. Второй пример
делает то же самое с коллекцией Worksheets.
Чтобы опробовать эти примеры, вы должны сначала добавить лист-диаграмму в свою книгу, чтобы увидеть разницу.
Sub KollSheets() Dim sht As Variant ' Показать название и тип каждого листа For Each sht In ThisWorkbook.Sheets Debug.Print sht.Name & " is type " & TypeName(sht) Next sht End Sub Sub KollWorkSheets() Dim sht As Variant ' Показать название и тип каждого листа For Each sht In ThisWorkbook.Worksheets Debug.Print sht.Name & " is type " & TypeName(sht) Next sht End Sub
Если у вас нет листов диаграмм, то использование коллекции Sheets — то же самое, что использование коллекции WorkSheets.
Заключение
На этом мы завершаем статью о Worksheet VBA. Я надеюсь, что было полезным.
Три наиболее важных элемента Excel VBA — это рабочие книги, рабочие таблицы, диапазоны и ячейки.
Эти элементы будут использоваться практически во всем, что вы делаете. Понимание их сделает вашу жизнь намного проще и сделает изучение VBA увлекательнее.
Sometimes, Excel seems too good to be true. All I have to do is enter a formula, and pretty much anything I’d ever need to do manually can be done automatically.
Need to merge two sheets with similar data? Excel can do it.
Need to do simple math? Excel can do it.
Need to combine information in multiple cells? Excel can do it.
In this post, I’ll go over the best tips, tricks, and shortcuts you can use right now to take your Excel game to the next level. No advanced Excel knowledge required.
-
What is Excel?
-
Excel Basics
-
How to Use Excel
-
Excel Tips
-
Excel Keyboard Shortcuts
What is Excel?
Microsoft Excel is powerful data visualization and analysis software, which uses spreadsheets to store, organize, and track data sets with formulas and functions. Excel is used by marketers, accountants, data analysts, and other professionals. It’s part of the Microsoft Office suite of products. Alternatives include Google Sheets and Numbers.
Find more Excel alternatives here.
What is Excel used for?
Excel is used to store, analyze, and report on large amounts of data. It is often used by accounting teams for financial analysis, but can be used by any professional to manage long and unwieldy datasets. Examples of Excel applications include balance sheets, budgets, or editorial calendars.
Excel is primarily used for creating financial documents because of its strong computational powers. You’ll often find the software in accounting offices and teams because it allows accountants to automatically see sums, averages, and totals. With Excel, they can easily make sense of their business’ data.
While Excel is primarily known as an accounting tool, professionals in any field can use its features and formulas — especially marketers — because it can be used for tracking any type of data. It removes the need to spend hours and hours counting cells or copying and pasting performance numbers. Excel typically has a shortcut or quick fix that speeds up the process.
You can also download Excel templates below for all of your marketing needs.
After you download the templates, it’s time to start using the software. Let’s cover the basics first.
Excel Basics
If you’re just starting out with Excel, there are a few basic commands that we suggest you become familiar with. These are things like:
- Creating a new spreadsheet from scratch.
- Executing basic computations like adding, subtracting, multiplying, and dividing.
- Writing and formatting column text and titles.
- Using Excel’s auto-fill features.
- Adding or deleting single columns, rows, and spreadsheets. (Below, we’ll get into how to add things like multiple columns and rows.)
- Keeping column and row titles visible as you scroll past them in a spreadsheet, so that you know what data you’re filling as you move further down the document.
- Sorting your data in alphabetical order.
Let’s explore a few of these more in-depth.
For instance, why does auto-fill matter?
If you have any basic Excel knowledge, it’s likely you already know this quick trick. But to cover our bases, allow me to show you the glory of autofill. This lets you quickly fill adjacent cells with several types of data, including values, series, and formulas.
There are multiple ways to deploy this feature, but the fill handle is among the easiest. Select the cells you want to be the source, locate the fill handle in the lower-right corner of the cell, and either drag the fill handle to cover cells you want to fill or just double click:
Similarly, sorting is an important feature you’ll want to know when organizing your data in Excel.
Sometimes you may have a list of data that has no organization whatsoever. Maybe you exported a list of your marketing contacts or blog posts. Whatever the case may be, Excel’s sort feature will help you alphabetize any list.
Click on the data in the column you want to sort. Then click on the «Data» tab in your toolbar and look for the «Sort» option on the left. If the «A» is on top of the «Z,» you can just click on that button once. If the «Z» is on top of the «A,» click on the button twice. When the «A» is on top of the «Z,» that means your list will be sorted in alphabetical order. However, when the «Z» is on top of the «A,» that means your list will be sorted in reverse alphabetical order.
Let’s explore more of the basics of Excel (along with advanced features) next.
To use Excel, you only need to input the data into the rows and columns. And then you’ll use formulas and functions to turn that data into insights.
We’re going to go over the best formulas and functions you need to know. But first, let’s take a look at the types of documents you can create using the software. That way, you have an overarching understanding of how you can use Excel in your day-to-day.
Documents You Can Create in Excel
Not sure how you can actually use Excel in your team? Here is a list of documents you can create:
- Income Statements: You can use an Excel spreadsheet to track a company’s sales activity and financial health.
- Balance Sheets: Balance sheets are among the most common types of documents you can create with Excel. It allows you to get a holistic view of a company’s financial standing.
- Calendar: You can easily create a spreadsheet monthly calendar to track events or other date-sensitive information.
Here are some documents you can create specifically for marketers.
- Marketing Budgets: Excel is a strong budget-keeping tool. You can create and track marketing budgets, as well as spend, using Excel. If you don’t want to create a document from scratch, download our marketing budget templates for free.
- Marketing Reports: If you don’t use a marketing tool such as Marketing Hub, you might find yourself in need of a dashboard with all of your reports. Excel is an excellent tool to create marketing reports. Download free Excel marketing reporting templates here.
- Editorial Calendars: You can create editorial calendars in Excel. The tab format makes it extremely easy to track your content creation efforts for custom time ranges. Download a free editorial content calendar template here.
- Traffic and Leads Calculator: Because of its strong computational powers, Excel is an excellent tool to create all sorts of calculators — including one for tracking leads and traffic. Click here to download a free premade lead goal calculator.
This is only a small sampling of the types of marketing and business documents you can create in Excel. We’ve created an extensive list of Excel templates you can use right now for marketing, invoicing, project management, budgeting, and more.
In the spirit of working more efficiently and avoiding tedious, manual work, here are a few Excel formulas and functions you’ll need to know.
Excel Formulas
It’s easy to get overwhelmed by the wide range of Excel formulas that you can use to make sense out of your data. If you’re just getting started using Excel, you can rely on the following formulas to carry out some complex functions — without adding to the complexity of your learning path.
- Equal sign: Before creating any formula, you’ll need to write an equal sign (=) in the cell where you want the result to appear.
- Addition: To add the values of two or more cells, use the + sign. Example: =C5+D3.
- Subtraction: To subtract the values of two or more cells, use the — sign. Example: =C5-D3.
- Multiplication: To multiply the values of two or more cells, use the * sign. Example: =C5*D3.
- Division: To divide the values of two or more cells, use the / sign. Example: =C5/D3.
Putting all of these together, you can create a formula that adds, subtracts, multiplies, and divides all in one cell. Example: =(C5-D3)/((A5+B6)*3).
For more complex formulas, you’ll need to use parentheses around the expressions to avoid accidentally using the PEMDAS order of operations. Keep in mind that you can use plain numbers in your formulas.
Excel Functions
Excel functions automate some of the tasks you would use in a typical formula. For instance, instead of using the + sign to add up a range of cells, you’d use the SUM function. Let’s look at a few more functions that will help automate calculations and tasks.
- SUM: The SUM function automatically adds up a range of cells or numbers. To complete a sum, you would input the starting cell and the final cell with a colon in between. Here’s what that looks like: SUM(Cell1:Cell2). Example: =SUM(C5:C30).
- AVERAGE: The AVERAGE function averages out the values of a range of cells. The syntax is the same as the SUM function: AVERAGE(Cell1:Cell2). Example: =AVERAGE(C5:C30).
- IF: The IF function allows you to return values based on a logical test. The syntax is as follows: IF(logical_test, value_if_true, [value_if_false]). Example: =IF(A2>B2,»Over Budget»,»OK»).
- VLOOKUP: The VLOOKUP function helps you search for anything on your sheet’s rows. The syntax is: VLOOKUP(lookup value, table array, column number, Approximate match (TRUE) or Exact match (FALSE)). Example: =VLOOKUP([@Attorney],tbl_Attorneys,4,FALSE).
- INDEX: The INDEX function returns a value from within a range. The syntax is as follows: INDEX(array, row_num, [column_num]).
- MATCH: The MATCH function looks for a certain item in a range of cells and returns the position of that item. It can be used in tandem with the INDEX function. The syntax is: MATCH(lookup_value, lookup_array, [match_type]).
- COUNTIF: The COUNTIF function returns the number of cells that meet a certain criteria or have a certain value. The syntax is: COUNTIF(range, criteria). Example: =COUNTIF(A2:A5,»London»).
Okay, ready to get into the nitty-gritty? Let’s get to it. (And to all the Harry Potter fans out there … you’re welcome in advance.)
Excel Tips
- Use Pivot tables to recognize and make sense of data.
- Add more than one row or column.
- Use filters to simplify your data.
- Remove duplicate data points or sets.
- Transpose rows into columns.
- Split up text information between columns.
- Use these formulas for simple calculations.
- Get the average of numbers in your cells.
- Use conditional formatting to make cells automatically change color based on data.
- Use IF Excel formula to automate certain Excel functions.
- Use dollar signs to keep one cell’s formula the same regardless of where it moves.
- Use the VLOOKUP function to pull data from one area of a sheet to another.
- Use INDEX and MATCH formulas to pull data from horizontal columns.
- Use the COUNTIF function to make Excel count words or numbers in any range of cells.
- Combine cells using ampersand.
- Add checkboxes.
- Hyperlink a cell to a website.
- Add drop-down menus.
- Use the format painter.
Note: The GIFs and visuals are from a previous version of Excel. When applicable, the copy has been updated to provide instruction for users of both newer and older Excel versions.
1. Use Pivot tables to recognize and make sense of data.
Pivot tables are used to reorganize data in a spreadsheet. They won’t change the data that you have, but they can sum up values and compare different information in your spreadsheet, depending on what you’d like them to do.
Let’s take a look at an example. Let’s say I want to take a look at how many people are in each house at Hogwarts. You may be thinking that I don’t have too much data, but for longer data sets, this will come in handy.
To create the Pivot Table, I go to Data > Pivot Table. If you’re using the most recent version of Excel, you’d go to Insert > Pivot Table. Excel will automatically populate your Pivot Table, but you can always change around the order of the data. Then, you have four options to choose from.
- Report Filter: This allows you to only look at certain rows in your dataset. For example, if I wanted to create a filter by house, I could choose to only include students in Gryffindor instead of all students.
- Column Labels: These would be your headers in the dataset.
- Row Labels: These could be your rows in the dataset. Both Row and Column labels can contain data from your columns (e.g. First Name can be dragged to either the Row or Column label — it just depends on how you want to see the data.)
- Value: This section allows you to look at your data differently. Instead of just pulling in any numeric value, you can sum, count, average, max, min, count numbers, or do a few other manipulations with your data. In fact, by default, when you drag a field to Value, it always does a count.
Since I want to count the number of students in each house, I’ll go to the Pivot table builder and drag the House column to both the Row Labels and the Values. This will sum up the number of students associated with each house.
2. Add more than one row or column.
As you play around with your data, you might find you’re constantly needing to add more rows and columns. Sometimes, you may even need to add hundreds of rows. Doing this one-by-one would be super tedious. Luckily, there’s always an easier way.
To add multiple rows or columns in a spreadsheet, highlight the same number of preexisting rows or columns that you want to add. Then, right-click and select «Insert.»
In the example below, I want to add an additional three rows. By highlighting three rows and then clicking insert, I’m able to add an additional three blank rows into my spreadsheet quickly and easily.
3. Use filters to simplify your data.
When you’re looking at very large data sets, you don’t usually need to be looking at every single row at the same time. Sometimes, you only want to look at data that fit into certain criteria.
That’s where filters come in.
Filters allow you to pare down your data to only look at certain rows at one time. In Excel, a filter can be added to each column in your data — and from there, you can then choose which cells you want to view at once.
Let’s take a look at the example below. Add a filter by clicking the Data tab and selecting «Filter.» Clicking the arrow next to the column headers and you’ll be able to choose whether you want your data to be organized in ascending or descending order, as well as which specific rows you want to show.
In my Harry Potter example, let’s say I only want to see the students in Gryffindor. By selecting the Gryffindor filter, the other rows disappear.
Pro Tip: Copy and paste the values in the spreadsheet when a Filter is on to do additional analysis in another spreadsheet.
4. Remove duplicate data points or sets.
Larger data sets tend to have duplicate content. You may have a list of multiple contacts in a company and only want to see the number of companies you have. In situations like this, removing the duplicates comes in quite handy.
To remove your duplicates, highlight the row or column that you want to remove duplicates of. Then, go to the Data tab and select «Remove Duplicates» (which is under the Tools subheader in the older version of Excel). A pop-up will appear to confirm which data you want to work with. Select «Remove Duplicates,» and you’re good to go.
You can also use this feature to remove an entire row based on a duplicate column value. So if you have three rows with Harry Potter’s information and you only need to see one, then you can select the whole dataset and then remove duplicates based on email. Your resulting list will have only unique names without any duplicates.
5. Transpose rows into columns.
When you have rows of data in your spreadsheet, you might decide you actually want to transform the items in one of those rows into columns (or vice versa). It would take a lot of time to copy and paste each individual header — but what the transpose feature allows you to do is simply move your row data into columns, or the other way around.
Start by highlighting the column that you want to transpose into rows. Right-click it, and then select «Copy.» Next, select the cells on your spreadsheet where you want your first row or column to begin. Right-click on the cell, and then select «Paste Special.» A module will appear — at the bottom, you’ll see an option to transpose. Check that box and select OK. Your column will now be transferred to a row or vice-versa.
On newer versions of Excel, a drop-down will appear instead of a pop-up.
6. Split up text information between columns.
What if you want to split out information that’s in one cell into two different cells? For example, maybe you want to pull out someone’s company name through their email address. Or perhaps you want to separate someone’s full name into a first and last name for your email marketing templates.
Thanks to Excel, both are possible. First, highlight the column that you want to split up. Next, go to the Data tab and select «Text to Columns.» A module will appear with additional information.
First, you need to select either «Delimited» or «Fixed Width.»
- «Delimited» means you want to break up the column based on characters such as commas, spaces, or tabs.
- «Fixed Width» means you want to select the exact location on all the columns that you want the split to occur.
In the example case below, let’s select «Delimited» so we can separate the full name into first name and last name.
Then, it’s time to choose the Delimiters. This could be a tab, semi-colon, comma, space, or something else. («Something else» could be the «@» sign used in an email address, for example.) In our example, let’s choose the space. Excel will then show you a preview of what your new columns will look like.
When you’re happy with the preview, press «Next.» This page will allow you to select Advanced Formats if you choose to. When you’re done, click «Finish.»
7. Use formulas for simple calculations.
In addition to doing pretty complex calculations, Excel can help you do simple arithmetic like adding, subtracting, multiplying, or dividing any of your data.
- To add, use the + sign.
- To subtract, use the — sign.
- To multiply, use the * sign.
- To divide, use the / sign.
You can also use parentheses to ensure certain calculations are done first. In the example below (10+10*10), the second and third 10 were multiplied together before adding the additional 10. However, if we made it (10+10)*10, the first and second 10 would be added together first.
8. Get the average of numbers in your cells.
If you want the average of a set of numbers, you can use the formula =AVERAGE(Cell1:Cell2). If you want to sum up a column of numbers, you can use the formula =SUM(Cell1:Cell2).
9. Use conditional formatting to make cells automatically change color based on data.
Conditional formatting allows you to change a cell’s color based on the information within the cell. For example, if you want to flag certain numbers that are above average or in the top 10% of the data in your spreadsheet, you can do that. If you want to color code commonalities between different rows in Excel, you can do that. This will help you quickly see information that is important to you.
To get started, highlight the group of cells you want to use conditional formatting on. Then, choose «Conditional Formatting» from the Home menu and select your logic from the dropdown. (You can also create your own rule if you want something different.) A window will pop up that prompts you to provide more information about your formatting rule. Select «OK» when you’re done, and you should see your results automatically appear.
10. Use the IF Excel formula to automate certain Excel functions.
Sometimes, we don’t want to count the number of times a value appears. Instead, we want to input different information into a cell if there is a corresponding cell with that information.
For example, in the situation below, I want to award ten points to everyone who belongs in the Gryffindor house. Instead of manually typing in 10’s next to each Gryffindor student’s name, I can use the IF Excel formula to say that if the student is in Gryffindor, then they should get ten points.
The formula is: IF(logical_test, value_if_true, [value_if_false])
Example Shown Below: =IF(D2=»Gryffindor»,»10″,»0″)
In general terms, the formula would be IF(Logical Test, value of true, value of false). Let’s dig into each of these variables.
- Logical_Test: The logical test is the «IF» part of the statement. In this case, the logic is D2=»Gryffindor» because we want to make sure that the cell corresponding with the student says «Gryffindor.» Make sure to put Gryffindor in quotation marks here.
- Value_if_True: This is what we want the cell to show if the value is true. In this case, we want the cell to show «10» to indicate that the student was awarded the 10 points. Only use quotation marks if you want the result to be text instead of a number.
- Value_if_False: This is what we want the cell to show if the value is false. In this case, for any student not in Gryffindor, we want the cell to show «0». Only use quotation marks if you want the result to be text instead of a number.
Note: In the example above, I awarded 10 points to everyone in Gryffindor. If I later wanted to sum the total number of points, I wouldn’t be able to because the 10’s are in quotes, thus making them text and not a number that Excel can sum.
The real power of the IF function comes when you string multiple IF statements together, or nest them. This allows you to set multiple conditions, get more specific results, and ultimately organize your data into more manageable chunks.
Ranges are one way to segment your data for better analysis. For example, you can categorize data into values that are less than 10, 11 to 50, or 51 to 100. Here’s how that looks in practice:
=IF(B3<11,“10 or less”,IF(B3<51,“11 to 50”,IF(B3<100,“51 to 100”)))
It can take some trial-and-error, but once you have the hang of it, IF formulas will become your new Excel best friend.
11. Use dollar signs to keep one cell’s formula the same regardless of where it moves.
Have you ever seen a dollar sign in an Excel formula? When used in a formula, it isn’t representing an American dollar; instead, it makes sure that the exact column and row are held the same even if you copy the same formula in adjacent rows.
You see, a cell reference — when you refer to cell A5 from cell C5, for example — is relative by default. In that case, you’re actually referring to a cell that’s five columns to the left (C minus A) and in the same row (5). This is called a relative formula. When you copy a relative formula from one cell to another, it’ll adjust the values in the formula based on where it’s moved. But sometimes, we want those values to stay the same no matter whether they’re moved around or not — and we can do that by turning the formula into an absolute formula.
To change the relative formula (=A5+C5) into an absolute formula, we’d precede the row and column values by dollar signs, like this: (=$A$5+$C$5). (Learn more on Microsoft Office’s support page here.)
12. Use the VLOOKUP function to pull data from one area of a sheet to another.
Have you ever had two sets of data on two different spreadsheets that you want to combine into a single spreadsheet?
For example, you might have a list of people’s names next to their email addresses in one spreadsheet, and a list of those same people’s email addresses next to their company names in the other — but you want the names, email addresses, and company names of those people to appear in one place.
I have to combine data sets like this a lot — and when I do, the VLOOKUP is my go-to formula.
Before you use the formula, though, be absolutely sure that you have at least one column that appears identically in both places. Scour your data sets to make sure the column of data you’re using to combine your information is exactly the same, including no extra spaces.
The formula: =VLOOKUP(lookup value, table array, column number, Approximate match (TRUE) or Exact match (FALSE))
The formula with variables from our example below: =VLOOKUP(C2,Sheet2!A:B,2,FALSE)
In this formula, there are several variables. The following is true when you want to combine information in Sheet 1 and Sheet 2 onto Sheet 1.
- Lookup Value: This is the identical value you have in both spreadsheets. Choose the first value in your first spreadsheet. In the example that follows, this means the first email address on the list, or cell 2 (C2).
- Table Array: The table array is the range of columns on Sheet 2 you’re going to pull your data from, including the column of data identical to your lookup value (in our example, email addresses) in Sheet 1 as well as the column of data you’re trying to copy to Sheet 1. In our example, this is «Sheet2!A:B.» «A» means Column A in Sheet 2, which is the column in Sheet 2 where the data identical to our lookup value (email) in Sheet 1 is listed. The «B» means Column B, which contains the information that’s only available in Sheet 2 that you want to translate to Sheet 1.
- Column Number: This tells Excel which column the new data you want to copy to Sheet 1 is located in. In our example, this would be the column that «House» is located in. «House» is the second column in our range of columns (table array), so our column number is 2. [Note: Your range can be more than two columns. For example, if there are three columns on Sheet 2 — Email, Age, and House — and you still want to bring House onto Sheet 1, you can still use a VLOOKUP. You just need to change the «2» to a «3» so it pulls back the value in the third column: =VLOOKUP(C2:Sheet2!A:C,3,false).]
- Approximate Match (TRUE) or Exact Match (FALSE): Use FALSE to ensure you pull in only exact value matches. If you use TRUE, the function will pull in approximate matches.
In the example below, Sheet 1 and Sheet 2 contain lists describing different information about the same people, and the common thread between the two is their email addresses. Let’s say we want to combine both datasets so that all the house information from Sheet 2 translates over to Sheet 1.
So when we type in the formula =VLOOKUP(C2,Sheet2!A:B,2,FALSE), we bring all the house data into Sheet 1.
Keep in mind that VLOOKUP will only pull back values from the second sheet that are to the right of the column containing your identical data. This can lead to some limitations, which is why some people prefer to use the INDEX and MATCH functions instead.
13. Use INDEX and MATCH formulas to pull data from horizontal columns.
Like VLOOKUP, the INDEX and MATCH functions pull in data from another dataset into one central location. Here are the main differences:
- VLOOKUP is a much simpler formula. If you’re working with large data sets that would require thousands of lookups, using the INDEX and MATCH function will significantly decrease load time in Excel.
- The INDEX and MATCH formulas work right-to-left, whereas VLOOKUP formulas only work as a left-to-right lookup. In other words, if you need to do a lookup that has a lookup column to the right of the results column, then you’d have to rearrange those columns in order to do a VLOOKUP. This can be tedious with large datasets and/or lead to errors.
So if I want to combine information in Sheet 1 and Sheet 2 onto Sheet 1, but the column values in Sheets 1 and 2 aren’t the same, then to do a VLOOKUP, I would need to switch around my columns. In this case, I’d choose to do an INDEX and MATCH instead.
Let’s look at an example. Let’s say Sheet 1 contains a list of people’s names and their Hogwarts email addresses, and Sheet 2 contains a list of people’s email addresses and the Patronus that each student has. (For the non-Harry Potter fans out there, every witch or wizard has an animal guardian called a «Patronus» associated with him or her.) The information that lives in both sheets is the column containing email addresses, but this email address column is in different column numbers on each sheet. I’d use the INDEX and MATCH formulas instead of VLOOKUP so I wouldn’t have to switch any columns around.
So what’s the formula, then? The formula is actually the MATCH formula nested inside the INDEX formula. You’ll see I differentiated the MATCH formula using a different color here.
The formula: =INDEX(table array, MATCH formula)
This becomes: =INDEX(table array, MATCH (lookup_value, lookup_array))
The formula with variables from our example below: =INDEX(Sheet2!A:A,(MATCH(Sheet1!C:C,Sheet2!C:C,0)))
Here are the variables:
- Table Array: The range of columns on Sheet 2 containing the new data you want to bring over to Sheet 1. In our example, «A» means Column A, which contains the «Patronus» information for each person.
- Lookup Value: This is the column in Sheet 1 that contains identical values in both spreadsheets. In the example that follows, this means the «email» column on Sheet 1, which is Column C. So: Sheet1!C:C.
- Lookup Array: This is the column in Sheet 2 that contains identical values in both spreadsheets. In the example that follows, this refers to the «email» column on Sheet 2, which happens to also be Column C. So: Sheet2!C:C.
Once you have your variables straight, type in the INDEX and MATCH formulas in the top-most cell of the blank Patronus column on Sheet 1, where you want the combined information to live.
14. Use the COUNTIF function to make Excel count words or numbers in any range of cells.
Instead of manually counting how often a certain value or number appears, let Excel do the work for you. With the COUNTIF function, Excel can count the number of times a word or number appears in any range of cells.
For example, let’s say I want to count the number of times the word «Gryffindor» appears in my data set.
The formula: =COUNTIF(range, criteria)
The formula with variables from our example below: =COUNTIF(D:D,»Gryffindor»)
In this formula, there are several variables:
- Range: The range that we want the formula to cover. In this case, since we’re only focusing on one column, we use «D:D» to indicate that the first and last column are both D. If I were looking at columns C and D, I would use «C:D.»
- Criteria: Whatever number or piece of text you want Excel to count. Only use quotation marks if you want the result to be text instead of a number. In our example, the criteria is «Gryffindor.»
Simply typing in the COUNTIF formula in any cell and pressing «Enter» will show me how many times the word «Gryffindor» appears in the dataset.
15. Combine cells using &.
Databases tend to split out data to make it as exact as possible. For example, instead of having a column that shows a person’s full name, a database might have the data as a first name and then a last name in separate columns. Or, it may have a person’s location separated by city, state, and zip code. In Excel, you can combine cells with different data into one cell by using the «&» sign in your function.
The formula with variables from our example below: =A2&» «&B2
Let’s go through the formula together using an example. Pretend we want to combine first names and last names into full names in a single column. To do this, we’d first put our cursor in the blank cell where we want the full name to appear. Next, we’d highlight one cell that contains a first name, type in an «&» sign, and then highlight a cell with the corresponding last name.
But you’re not finished — if all you type in is =A2&B2, then there will not be a space between the person’s first name and last name. To add that necessary space, use the function =A2&» «&B2. The quotation marks around the space tell Excel to put a space in between the first and last name.
To make this true for multiple rows, simply drag the corner of that first cell downward as shown in the example.
16. Add checkboxes.
If you’re using an Excel sheet to track customer data and want to oversee something that isn’t quantifiable, you could insert checkboxes into a column.
For example, if you’re using an Excel sheet to manage your sales prospects and want to track whether you called them in the last quarter, you could have a «Called this quarter?» column and check off the cells in it when you’ve called the respective client.
Here’s how to do it.
Highlight a cell you’d like to add checkboxes to in your spreadsheet. Then, click DEVELOPER. Then, under FORM CONTROLS, click the checkbox or the selection circle highlighted in the image below.
Once the box appears in the cell, copy it, highlight the cells you also want it to appear in, and then paste it.
17. Hyperlink a cell to a website.
If you’re using your sheet to track social media or website metrics, it can be helpful to have a reference column with the links each row is tracking. If you add a URL directly into Excel, it should automatically be clickable. But, if you have to hyperlink words, such as a page title or the headline of a post you’re tracking, here’s how.
Highlight the words you want to hyperlink, then press Shift K. From there a box will pop up allowing you to place the hyperlink URL. Copy and paste the URL into this box and hit or click Enter.
If the key shortcut isn’t working for any reason, you can also do this manually by highlighting the cell and clicking Insert > Hyperlink.
18. Add drop-down menus.
Sometimes, you’ll be using your spreadsheet to track processes or other qualitative things. Rather than writing words into your sheet repetitively, such as «Yes», «No», «Customer Stage», «Sales Lead», or «Prospect», you can use dropdown menus to quickly mark descriptive things about your contacts or whatever you’re tracking.
Here’s how to add drop-downs to your cells.
Highlight the cells you want the drop-downs to be in, then click the Data menu in the top navigation and press Validation.
From there, you’ll see a Data Validation Settings box open. Look at the Allow options, then click Lists and select Drop-down List. Check the In-Cell dropdown button, then press OK.
19. Use the format painter.
As you’ve probably noticed, Excel has a lot of features to make crunching numbers and analyzing your data quick and easy. But if you ever spent some time formatting a sheet to your liking, you know it can get a bit tedious.
Don’t waste time repeating the same formatting commands over and over again. Use the format painter to easily copy the formatting from one area of the worksheet to another. To do so, choose the cell you’d like to replicate, then select the format painter option (paintbrush icon) from the top toolbar.
Excel Keyboard Shortcuts
Creating reports in Excel is time-consuming enough. How can we spend less time navigating, formatting, and selecting items in our spreadsheet? Glad you asked. There are a ton of Excel shortcuts out there, including some of our favorites listed below.
Create a New Workbook
PC: Ctrl-N | Mac: Command-N
Select Entire Row
PC: Shift-Space | Mac: Shift-Space
Select Entire Column
PC: Ctrl-Space | Mac: Control-Space
Select Rest of Column
PC: Ctrl-Shift-Down/Up | Mac: Command-Shift-Down/Up
Select Rest of Row
PC: Ctrl-Shift-Right/Left | Mac: Command-Shift-Right/Left
Add Hyperlink
PC: Ctrl-K | Mac: Command-K
Open Format Cells Window
PC: Ctrl-1 | Mac: Command-1
Autosum Selected Cells
PC: Alt-= | Mac: Command-Shift-T
Other Excel Help Resources
- How to Make a Chart or Graph in Excel [With Video Tutorial]
- Design Tips to Create Beautiful Excel Charts and Graphs
- Totally Free Microsoft Excel Templates That Make Marketing Easier
- How to Learn Excel Online: Free and Paid Resources for Excel Training
Use Excel to Automate Processes in Your Team
Even if you’re not an accountant, you can still use Excel to automate tasks and processes in your team. With the tips and tricks we shared in this post, you’ll be sure to use Excel to its fullest extent and get the most out of the software to grow your business.
Editor’s Note: This post was originally published in August 2017 but has been updated for comprehensiveness.
How To Use Excel:
A Beginner’s Guide To Getting Started
Written by co-founder Kasper Langmann, Microsoft Office Specialist.
Excel is a powerful application—but it can also be very intimidating.
That’s why we’ve put together this beginner’s guide to getting started with Excel.
It will take you from the very beginning (opening a spreadsheet), through entering and working with data, and finish with saving and sharing.
It’s everything you need to know to get started with Excel.
If you want to tag along as you read, please download the free sample Excel workbook here.
Opening an Excel spreadsheet
When you first open Excel (by double-clicking the icon or selecting it from the Start menu), the application will ask what you want to do.
If you want to open a new Excel spreadsheet, click Blank workbook.
To open an existing spreadsheet (like the example workbook you just downloaded), click Open Other Workbooks in the lower-left corner, then click Browse on the left side of the resulting window.
Then use the file explorer to find the Excel workbook you’re looking for, select it, and click Open.
Workbooks vs. spreadsheets
There’s something we should clear up before we move on.
A workbook is an Excel file. It usually has a file extension of .XLSX (if you’re using an older version of Excel, it could be .XLS).
A spreadsheet is a single sheet inside a workbook. There can be many sheets inside of a workbook, and they’re accessed via the tabs at the bottom of the screen.
A spreadsheet (a.k.a. a sheet/tab) contains all the cells you can see and use in the >1 million rows >16,000 columns.
Working with the Ribbon
The Ribbon is the central control panel of Excel. You can do just about everything you need to directly from the Ribbon.
Where is this powerful tool? At the top of the window:
There are a number of tabs, including the File tab, Home tab, Insert tab, Data tab, Review tab, and a few others. Each tab contains different buttons.
Try clicking on a few different tabs to see which buttons appear below them.
There’s also a very useful search bar in the Ribbon. It says Tell me what you want to do. Just type in what you’re looking for, and Excel will help you find it.
Most of the time, you’ll be in the Home tab of the Ribbon. But Formulas and Data are also very useful (we’ll be talking about formulas shortly).
Pro tip: Ribbon sections
In addition to tabs, the Ribbon also has some smaller sections. And when you’re looking for something specific, those sections can help you find it.
For example, if you’re looking for sorting and filtering options, you don’t want to hover over dozens of buttons finding out what they do.
Instead, skim through the section names until you find what you’re looking for:
Managing your sheets
As we saw, workbooks can contain multiple sheets.
You can manage those sheets with the sheet tabs near the bottom of the screen. Click a tab to open that particular worksheet.
If you’re using our example workbook, you’ll see two sheets, called Welcome and Thank You:
To add a new worksheet, click the + (plus) button at the end of the list of sheets.
You can also reorder the sheets in your workbook by dragging them to a new location.
And if you right-click a worksheet tab, you’ll get a number of options:
For now, don’t worry too much about these options. Rename and Delete are useful, but the rest needn’t concern you.
Entering data
Now it’s time to enter some data!
And while entering data is one of the most central and important things you can do in Excel, it’s almost effortless.
Just click into a blank cell and start typing.
Go ahead, try it! Type your name, birthday, and your favorite number into some blank cells.
You can also copy (Ctrl + C), cut (Ctrl + X), and paste (Ctrl + V) any data you’d like (or read our full guide on copying and pasting here).
Try copying and pasting the data from multiple cells inthe example spreadsheet into another column.
You can also copy data from other programs into Excel.
Try copying this list of numbers and pasting it into your sheet:
- 17
- 24
- 9
- 00
- 3
- 12
That’s all we’re going to cover for basic data entry. Just know that there are lots of other ways to get data into your spreadsheets if you need them.
Basic calculations
Now that we’ve seen how to get some basic data into our spreadsheet, we’re going to do some things with it.
Running basic calculations in Excel is easy. First, we’ll look at how to add two numbers.
Important: start calculations with = (equals)
When you’re running a calculation (or a formula, which we’ll discuss next), the first thing you need to type is an equals sign. This tells Excel to get ready to run some sort of calculation.
So when you see something like =MEDIAN(A2:A51), make sure you type it exactly as it is—including the equals sign.
Let’s add 3 and 4. Type the following formula in a blank cell:
=3+4
Then hit Enter.
When you hit Enter, Excel evaluates your equation and displays the result, 7.
But if you look above at the formula bar, you’ll still see the original formula.
That’s a useful thing to keep in mind, in case you forget what you typed originally.
You can also edit a cell in the formula bar. Click on any cell, then click into the formula bar and start typing.
Performing subtraction, multiplication, and division is just as easy. Try these formulas:
- =4-6
- =2*5
- =-10/3
What we’re going to cover next is one of the most important things in Excel. We’re giving it a very basic overview here, but feel free to read our post on cell references to get the details.
Now let’s try something different. Open up the first sheet in the example workbook, click into cell C1, and type the following:
=A1+B1
Hit Enter.
You should get 82, the sum of the numbers in cells A1 and B1.
Now, change one of the numbers in A1 or B1 and watch what happens:
Because you’re adding A1 and B1, Excel automatically updates the total when you change the values in one of those cells.
Try doing different types of arithmetic on the other numbers in columns A and B using this method.
Unlocking the power of functions
Excel’s greatest power lies in functions. These let you run complex calculations with a few keypresses.
We’ll barely scratch the surface of functions here. Check out our other blog posts to see some of the great things you can do with functions!
Many formulas take sets of numbers and give you information about them.
For example, the AVERAGE function gives you the average of a set of numbers. Let’s try using it.
Click into an empty cell and type the following formula:
=AVERAGE(A1:A4)
Then hit Enter.
The resulting number, 0.25, is the average of the numbers in cells A1, A2, A3, and A4.
Cell range notation
In the formula above, we used “A1:A4” to tell Excel to look at all the cells between A1 and A4, including both of those cells. You can read it as “A1 through A4.”
You can also use this to include numbers in different columns. “A5:C7” includes A5, A6, A7, B5, B6, B7, C5, C6, and C7.
There are also functions that work on text.
Let’s try the CONCATENATE function!
Click into cell C5 and type this formula:
=CONCATENATE(A5, ” “, B5)
Then hit Enter.
You’ll see the message “Welcome to Spreadsheeto” in the cell.
How did this happen? CONCATENATE takes cells with text in them and puts them together.
We put the contents of A5 and B5 together. But because we also needed a space between “to” and “Spreadsheeto,” we included a third argument: the space between two quotes.
Remember that you can mix cell references (like “A5″) and typed values (like ” “) in formulas.
Excel has dozens of useful functions. To find the function that will solve a particular problem, head to the Formulas tab and click on one of the icons:
Scroll through the list of available functions, and select the one you want (you may have to look around for a while).
Then Excel will help you get the right numbers in the right places:
If you start typing a formula, starting with the equals sign, Excel will help you by showing you some possible functions that you might be looking for:
And finally, once you’ve typed the name of a formula and the opening parenthesis, Excel will tell you which arguments need to go where:
If you’ve never used a function before, it might be difficult to interpret Excel’s reminders. But once you get more experience, it’ll become clear.
This is a tiny preview of how functions work and what they can do. It should be enough to get you going on the tasks you need to accomplish right away.
Saving and sharing your work
After you’ve done a bunch of work with your spreadsheet, you’re going to want to save your changes.
Hit Ctrl + S to save. If you haven’t yet saved your spreadsheet, you’ll be asked where you want to save it and what you want to call it.
You can also click the Save button in the Quick Access Toolbar:
It’s a good idea to get into the habit of saving often. Trying to recover unsaved changes is a pain!
The easiest way to share your spreadsheets is via OneDrive.
Click the Share button in the top-right corner of the window, and Excel will walk you through sharing your document.
You can also save your document and email it, or use any other cloud service to share it with others.
That’s it – Now what?
This was how to use Excel.
Or… at least a small fraction of it.
Microsoft Excel can be intimidating, but once you get the basics down, it’s easier to learn the more advanced functions.
This was your introduction to “the basics”. So, if you’re not ready to get some advanced Excel knowledge, go ahead and practice with some of the existing data at the office 🧑🏼💻
If you’re ready to take your next steps, go ahead and enroll in my 30-minute free online course where you learn: IF, SUMIF, VLOOKUP, and data cleaning.
These are some of the most important topics of Excel💪🏼
Other resources
Now, you can’t excel at Excel without mastering some of the lookup functions like VLOOKUP and the new XLOOKUP.
But also, you don’t wanna miss out on pivot tables. You can use these to transform your Microsoft Excel data into insightful reports in just a few clicks🤯
Or if you’re into automating Excel spreadsheet formatting, go ahead and read my guide to conditional formatting here.
Kasper Langmann2023-02-23T14:45:07+00:00
Page load link