Insert text into a cell with a formula in Microsoft Excel. Excel text functions Using text functions in excel

Everyone knows that a spreadsheet Microsoft Excel designed to process numerical information. Its functionality allows you to process large amounts of calculated data. But with its help you can process the text. It can be surnames, first names, patronymics of employees, postal addresses and many more text information written in table cells.

Various Internet services allow you to import data in spreadsheet format, and this data is not always convenient for further processing. And if you need to correct the text on hundreds of lines, then you cannot do without text functions. In this article, I suggest that you familiarize yourself with text functions in Excel and understand the examples of their use.

Microsoft Excel Text Functions

First, let's look at the basic text functions that are used in the examples below. Excel uses Russian function names, unlike its closest counterpart, LibreOffice.Calc. Following is the text function notation format and its action.

CONCATENATE(text1,[text2],…)- connects several text lines from different cells into one.
LEFT(text,[num_chars])- prints the first character or a given number of first characters from a text string.
FIND(search_text, search_text, [start_position]) - finds the position of the beginning of the occurrence of the search text in the given text string, case sensitive.
SEARCH(search_text, search_text, [start_position])- the same as Find, but case insensitive.
MID(text;start_position;number_of_characters)- displays the specified number of characters from the text string, starting from the specified position.
DLSTR(text)- counts the number of characters in a text string.

Task 1. Concatenation of text strings

There is a list of employees. Surnames, first names and patronymics are placed in separate columns. You need to combine the data into one column.

Decision. The task is quite simple and for its implementation we will use the CONCATENATE function.

In cell D1, write the formula =CONCATENATE(A1;" ";B1;" ";C1). You can use the function wizard.

If you specify only cell addresses in the function, then the text will be merged into one long string. Therefore, we add a space in quotes between cell addresses.

Look at the picture below. The result of the conversion is in column D.

CONCATENATE Wizard window

Task 2. Splitting text strings

After importing employee data, their last names, first names, and patronymics ended up in one column. You need to split the data into columns.

Decision. The task is more complicated than the previous one, and several text functions will be needed to implement it.

To separate the employee's last name and write in cell B1 the formula

=LEFT(A1,FIND(" ",A1))

In this formula, the number of displayed characters is calculated by the function To find A that locates the first space in the string.


Formula bar when splitting full name

To write the name in cell C1, write the following formula

=MID(A1;FIND(" ";A1)+1;SEARCH(" ";A1;FIND(" ";A1)+1)-FIND(" ";A1)-1)

If we look at the syntax for writing this function, we get:

  1. Expression FIND(" ";A1)+1 responds by finding the position of the first space in the text string. And to get the position of the first letter of the name, one is added.
  2. To determine the number of characters in the name, a more complicated construction is used SEARCH(" ";A1;FIND(" ";A1)+1)-FIND(" ";A1)-1. The number of characters is defined as the difference between the positions of the spaces separating the name. To exclude the spaces themselves from the number of found characters, one is added to the initial position, and then one is subtracted from the result.

The patronymic is obtained in cell D1 according to a more complex formula

=MID(A1;SEARCH(" ";A1;FIND(" ";A1)+1)+1;LSTR(A1)-SEARCH(" ";A1;FIND(" ";A1)+1)+1)

Here, the number of characters in the patronymic is defined as the difference between the total number of characters ( DLSTR) and the position of the second space.

In the considered examples of the function SEARCH and TO FIND perform the same operations, since the difference in character case is not taken into account. It is possible to get by with only one of them.

Task 3. Shortening text strings

Make changes to the list of employees. Write in one column Surnames and initials.

Decision. Depending on the initial state The list has two options.

1 option. The original data is contained in one column. Names are separated by a single space.

We write the following formula

=CONCATENATE(LEFT(A1;FIND(" ";A1));MID(A1;FIND(" ";A1);2);".",;MID(A1;FIND(" ";A1; FIND(" " ;A1)+1);2);".")


Let's convert the name and patronymic into initials (initial data in one column)

Option 2. The original data is contained in different columns.

Formula for conversion

=CONCATENATE(A1;" ";LEFT(B1);".";LEFT(C1);".")


Let's convert the name and patronymic into initials (initial data in different columns)

Friends, if you can give your own examples of using text functions in Excel, tell us about them in the comments. I recommend to look. If you liked the article, please share with your friends. Buttons social networks down below.

Dear reader! You have read the article to the end.
Did you get an answer to your question? Write a few words in the comments.
If no answer is found, indicate what you are looking for.

In program lines Microsoft Office Excel can enter any information that users need to successfully complete their tasks. To be most productive, you need to be able to deal with data in rows. In this material, examples of text functions in Excel will be considered.

To find them in the program, go to the tab called "Formulas", open the list and select "Text".

"CONNECT"

This feature gives the user the ability to concatenate multiple strings together. The maximum number allowed for connection reaches 255. Please note that you need to put spaces here yourself. The body of "CONCATENATE" must contain at least one argument. Consider an example of its entry and action:

  • =CONCATENATE("Argument1";"";"Argument2");
  • The result will be the following line: "Argument1 Argument2".

An alternative to this function for working with text is the & symbol, which is also responsible for concatenating strings.

"PSTR"

It is responsible for returning from the required string a piece of text in the specified number of characters. The line starts with the marked character. Key positions (text, starting position, number of characters). Each of them is defined as follows:

  • Text is a string or cell reference containing the required information.
  • The starting position marks the character number from which the string will be returned.
  • The number of characters is a natural integer indicating the number of characters to return, starting from the starting position.

An example is the following situation. Cell A1 contains some text. It is necessary to return the last two words, the total length of characters is 12. The character to be returned in a particular phrase is numbered 12.

"SUBSTITUTE"

Performs the replacement of the finished text with the required one in the place that will be specified by the user. Something similar to a function called "Replace". But details about it will be presented later. The main difference of this option is that it automatically calculates the occurrences of the required string and performs the replacement.

A specific function looks like this: text; old text; new text; entry number.

Let's take a look at each of the arguments:

  • Text is a link to a specific cell or line that contains this very information.
  • The old text is the original version of the data stored in the cell that needs to be replaced.
  • The new text is the string required to perform the change of the old data variant.
  • The occurrence number is an optional argument in this text function in Excel. When specified, only matching occurrences will be replaced. In his absence, change will occur everywhere.

"REPLACE"

Performs the function of replacing part of a string in a specified number of characters. The process starts from the character, which is indicated by the account, to the new text. It looks like this: old text; starting position; number of signs; new text.

Consider separately each of the arguments of this text function in Excel:

  • A link to a specific cell or line containing previously entered information is called Old Text.
  • The starting position indicates the number of the character from which the replacement should be made (numbering goes from left to right).
  • The new text is a string that replaces the previously entered information, which was set by the Start position and the Number of characters.

Now let's look at an example of using the text function in Excel. Cell A1 contains a string with the word "old". It starts at the 19th character and has a duration of six identical units. The replacement takes place on the word "new".

It should be noted that this situation is rather twofold. On the one hand, if the user will work with a small number of cells, then this option will work great. But what about a situation where you have to perform a replacement among several thousand lines? In this case, it is worth referring to two other Excel text functions, which will be discussed a little later:

  • We will replace the initial position with "FIND".
  • The number of characters will change to "DLSTR".

"DLSTR"

This text function in Excel helps the user determine the length of a string. The result of its work will be the return of an integer demonstrating the amount of characters in the text. It looks like this: =DLSTR(text).

"TO FIND"

When working with text, it performs the function of returning a number, which is an occurrence of the first character of the required text in the substring. In the event that the data was not found, instead of a number, the error "#VALUE!" is returned.

Here is its form in the document. But without specific arguments: =FIND(search text; search text; start position).

Let's take a look at each of these arguments one by one:

  • The required string is the Search text.
  • The data in which the first argument is searched is the Search Text.
  • The starting position is optional. By default, it has a value of one.

Formulas in Excel are one of the most important advantages of this editor. Thanks to them, your possibilities when working with tables increase several times and are limited only by the available knowledge. You can do anything. At the same time, Excel will help at every step - in almost any window there are special tips.

To create a simple formula, just follow the following instructions:

  1. Make any cell active. Click on the formula entry bar. Put an equal sign.
  1. Enter any expression. Can be used as numbers

In this case, the affected cells are always highlighted. This is done so that you do not make a mistake with the choice. It is easier to see the error visually than in text form.

What is the formula

Let's take the following expression as an example.

It consists of:

  • the symbol "=" - any formula begins with it;
  • "SUM" function;
  • function argument "A1:C1" (in this case, it is an array of cells from "A1" to "C1");
  • operator "+" (addition);
  • links to cell "C1";
  • operator "^" (exponentiation);
  • constants "2".

Using Operators

Operators in the Excel editor indicate exactly what operations to perform on the specified elements of the formula. The calculation always follows the same order:

  • parentheses;
  • exhibitors;
  • multiplication and division (depending on the sequence);
  • addition and subtraction (also depending on the sequence).

Arithmetic

These include:

  • addition - "+" (plus);
=2+2
  • negation or subtraction - "-" (minus);
=2-2 =-2

If you put a minus in front of the number, then it will take a negative value, but the absolute value will remain exactly the same.

  • multiplication - "*";
=2*2
  • division "/";
=2/2
  • percent "%";
=20%
  • exponentiation - "^".
=2^2

Comparison Operators

These operators are used to compare values. The operation returns TRUE or FALSE. These include:

  • the sign of "equality" - "=";
=C1=D1
  • greater than sign - ">";
=C1>D1
  • less sign -<»;
=C1
  • the sign "greater than or equal to" - ">=";
  • =C1>=D1
    • less than or equal sign<=»;
    =C1<=D1
    • "not equal" sign<>».
    =C1<>D1

    Text concatenation operator

    The special character "&" (ampersand) is used for this purpose. With it, you can connect different fragments into one whole - the same principle as with the "CONNECT" function. Here are some examples:

    1. If you want to combine text in cells, then you need to use the following code.
    =A1&A2&A3
    1. In order to insert some character or letter between them, you need to use the following construction.
    =A1&","&A2&","&A3
    1. You can combine not only cells, but also ordinary characters.
    ="Auto"&"Mobile"

    Any text other than links must be enclosed in quotation marks. Otherwise, the formula will throw an error.

    Please note that quotes are used exactly as in the screenshot.

    You can use the following operators to define links:

    • in order to create a simple link to the desired range of cells, it is enough to specify the first and last cell of this area, and the “:” symbol between them;
    • to combine links, use the sign ";";
    • if it is necessary to determine the cells that are at the intersection of several ranges, then a “space” is placed between the links. In this case, the value of the cell "C7" will be displayed.

    Since only it falls under the definition of "intersection of sets." This is the name of this operator (space).

    Use of links

    While working in the Excel editor, you can use links of various kinds. However, most novice users know how to use only the simplest of them. We will teach you how to correctly enter links of all formats.

    Simple Links A1

    As a rule, this type is used most often, since it is much more convenient to compose them than the rest.

    • columns - from A to XFD (no more than 16384);
    • lines - from 1 to 1048576.

    Here are some examples:

    • cell at the intersection of row 5 and column B - "B5";
    • range of cells in column B starting from row 5 to row 25 - "B5:B25";
    • the range of cells in row 5 starting from column B to F - "B5:F5";
    • all cells in row 10 - "10:10";
    • all cells in rows 10 to 15 - "10:15";
    • all cells in column B - "B:B";
    • all cells in columns from B to K - "B:K";
    • the range of cells from B2 to F5 is "B2-F5".

    Sometimes formulas use information from other sheets. It works as follows.

    =SUM(Sheet2!A5:C5)

    The second sheet contains the following data.

    If there is a space in the sheet name, then in the formula it must be indicated in single quotes (apostrophes).

    =SUM("Sheet number 2"!A5:C5)

    Absolute and relative links

    The Excel editor works with three types of links:

    • absolute;
    • relative;
    • mixed.

    Let's consider them more carefully.

    All of the previously mentioned examples belong to relative cell addresses. This type is the most popular. The main practical advantage is that the editor will change the references to a different value during the migration. In accordance with where exactly you copied this formula. For the calculation, the number of cells between the old and new position will be taken into account.

    Imagine that you need to stretch this formula to the entire column or row. You will not manually change letters and numbers in cell addresses. It works as follows.

    1. Enter the formula for calculating the sum of the first column.
    =SUM(B4:B9)
    1. Press the hotkeys Ctrl +C . In order to transfer the formula to the next cell, you need to go there and press Ctrl + V .

    If the table is very large, it is better to click on the lower right corner and, without releasing your finger, stretch the pointer to the end. If there is little data, then copying using hotkeys is much faster.

    1. Now look at the new formulas. The change in the column index happened automatically.

    If you want all links to be preserved when transferring formulas (that is, so that they do not change automatically), you need to use absolute addresses. They are specified as "$B$2".

    =SUM($B$4:$B$9)

    As a result, we see that no changes have occurred. All columns display the same number.

    This type of address is used when it is necessary to fix only a column or row, and not all at the same time. You can use the following constructs:

    • $D1, $F5, $G3 - for fixing columns;
    • D$1, F$5, G$3 - to fix rows.

    Work with such formulas only when necessary. For example, if you need to work with one constant row of data, but only change the columns. And most importantly - if you are going to calculate the result in different cells that are not located along the same line.

    The fact is that when you copy the formula to another line, the numbers in the links will automatically change by the number of cells from the original value. If you use mixed addresses, then everything will remain in place. This is done in the following way.

    1. Let's use the following expression as an example.
    =B$4
    1. Let's move this formula to another cell. Preferably not on the next and on another line. Now you can see that the new expression contains the same string (4) but a different letter, since it was the only one that was relative.

    3D Links

    The concept of "three-dimensional" includes those addresses in which a range of sheets is indicated. An example formula looks like this.

    =SUM(Sheet1:Sheet4!A5)

    In this case, the result will correspond to the sum of all cells "A5" on all sheets, starting from 1 to 4. When compiling such expressions, the following conditions must be observed:

    • arrays cannot use such references;
    • three-dimensional expressions are forbidden to be used where there is an intersection of cells (for example, the "space" operator);
    • when creating formulas with 3D addresses, you can use the following functions: AVERAGE, STDEV, STDEV.V, AVERAGE, STDEV, STDEV.Y, SUM, COUNT, COUNT, MIN, MAX, MIN, MAX, VARR, PRODUCT, VARV, VAR.V and DISPA.

    If you violate these rules, then you will see some kind of error.

    R1C1 format links

    This type of links differs from "A1" in that the number is given not only to rows, but also to columns. The developers decided to replace the normal view with this option for convenience in macros, but they can be used anywhere. Here are some examples of such addresses:

    • R10C10 is an absolute link to the cell, which is located on the tenth line of the tenth column;
    • R - absolute link to the current (in which the formula is indicated) link;
    • R[-2] – relative link to the line, which is located two positions above this one;
    • R[-3]C is a relative reference to the cell that is three positions higher in the current column (where you decide to write the formula);
    • RC is a relative link to the cell that is five cells to the right and five lines below the current one.

    Name usage

    The Excel program for naming cell ranges, single cells, tables (regular and summary), constants and expressions allows you to create your own unique names. At the same time, there is no difference for the editor when working with formulas - he understands everything.

    You can use the names for multiplication, division, addition, subtraction, calculation of interest, ratios, deviations, rounding, VAT, mortgages, loans, estimates, timesheets, various forms, discounts, salaries, seniority, annuity payments, working with VLOOKUP formulas , "VVD", "INTERIM. RESULTS" and so on. That is, you can do whatever you want.

    Only one thing can be called the main condition - you must determine this name in advance. Otherwise, Excel will not know anything about it. This is done in the following way.

    1. Select a column.
    2. Call the context menu.
    3. Select "Give Name".
    1. Specify the desired name for this object. In this case, you must adhere to the following rules.
    1. Click the "OK" button to save.

    In the same way, you can assign a name to any cell, text or number.

    You can use the information in the table both with the help of names and with the help of ordinary links. This is what the standard looks like.

    And if you try to insert our name instead of the address "D4: D9", you will see a hint. It is enough to write a few characters, and you will see what fits (from the name base) the most.

    In our case, everything is simple - “column_3”. And imagine that you will have a large number of such names. You won't be able to memorize everything.

    Using functions

    There are several ways to insert a function in the Excel editor:

    • manually;
    • using the toolbar;
    • using the Insert Function window.

    Let's take a closer look at each method.

    In this case, everything is simple - you use your hands, your own knowledge and skills to enter formulas in a special line or directly in a cell.

    If you do not have working experience in this area, then it is better to use more lightweight methods at first.

    In this case it is necessary:

    1. Go to the "Formulas" tab.
    2. Click on any library.
    3. Select the desired function.
    1. Immediately after that, the "Arguments and Functions" window will appear with the function already selected. You just have to put down the arguments and save the formula using the "OK" button.

    Substitution Wizard

    You can apply it like this:

    1. Make any cell active.
    2. Click on the "Fx" icon or use the keyboard shortcut SHIFT + F3.
    1. Immediately after that, the "Insert Function" window will open.
    2. Here you will see a large list of different features sorted by category. In addition, you can use the search if you can not find the desired item.

    It is enough to score a word that can describe what you want to do, and the editor will try to display all the suitable options.

    1. Select any function from the proposed list.
    2. To continue, you need to click on the "OK" button.
    1. You will then be asked for "Arguments and Functions". You can do this manually or simply select the desired range of cells.
    2. In order to apply all the settings, you need to click on the "OK" button.
    1. As a result of this, we will see the number 6, although this was already understandable, since the Arguments and Functions window displays a preliminary result. The data is recalculated instantly when any of the arguments changes.

    Using nested functions

    As an example, we will use formulas with logical conditions. To do this, we will need to add some kind of table.

    Then follow the instructions below:

    1. Click on the first cell. Call the "Insert function" window. Select the "If" function. Click "OK" to paste.
    1. Then you will need to compose some kind of logical expression. It must be written in the first field. For example, you can add the values ​​of three cells in one row and check if the sum is greater than 10. In the case of "true", specify the text "More than 10". For a false result - "Less than 10". Then click OK to return to the workspace.
    1. As a result, we see the following - the editor gave out that the sum of the cells in the third row is less than 10. And this is correct. So our code is working.
    =IF(SUM(B3:D3)>10,"Greater than 10","Less than 10")
    1. Now you need to configure the following cells. In this case, our formula simply extends further. To do this, you first need to move the cursor to the lower right corner of the cell. After the cursor changes, you need to make a left click and copy it to the very bottom.
    1. As a result, the editor recalculates our expression for each line.

    As you can see, the copy was quite successful because we used the relative links we talked about earlier. If you need to fix addresses in function arguments, then use absolute values.

    There are several ways to do this: use the formula bar or a special wizard. In the first case, everything is simple - click in a special field and manually enter the necessary changes. But writing there is not very convenient.

    The only thing you can do is increase the input field. To do this, just click on the indicated icon or press the key combination Ctrl + Shift + U.

    It is worth noting that this is the only way if you do not use functions in the formula.

    In the case of using functions, everything becomes much simpler. To edit, follow the instructions below:

    1. Make active the cell with the formula. Click on the "Fx" icon.
    1. After that, a window will appear in which you can change the arguments of the function you need in a very convenient way. In addition, here you can find out exactly what the result of recalculating the new expression will be.
    1. To save the changes made, use the "OK" button.

    To remove an expression, just do the following:

    1. Click on any cell.
    1. Click on the Delete or Backspace button. As a result, the cell will be empty.

    You can achieve exactly the same result using the Clear All tool.

    Possible errors when compiling formulas in the Excel editor

    The following are the most common mistakes that users make:

    • The expression uses a huge number of nestings. There should be no more than 64;
    • paths to external workbooks are specified in formulas without the full path;
    • Opening and closing parentheses are misplaced. That is why in the editor in the formula bar all brackets are highlighted in a different color;
    • the names of books and sheets are not taken in quotation marks;
    • numbers are used in the wrong format. For example, if you need to specify $2000, you just need to type in 2000 and select the appropriate cell format, since the $ symbol is used by the program for absolute references;
    • required function arguments are not specified. Note that optional arguments are enclosed in square brackets. Everything without them is necessary for the full operation of the formula;
    • Cell ranges are incorrect. To do this, you must use the ":" (colon) operator.

    Error codes when working with formulas

    When working with a formula, you may see the following error options:

    • #VALUE! - This error indicates that you are using the wrong data type. For example, you are trying to use text instead of a numeric value. Of course, Excel can't calculate the sum between two phrases;
    • #NAME? - a similar error means that you made a typo in the spelling of the function name. Or you are trying to enter something that does not exist. You can't do that. In addition, the problem may be in another. If you are sure about the function name, then try to look at the formula more closely. Perhaps you forgot a parenthesis. In addition, you need to take into account that text fragments are indicated in quotation marks. If all else fails, try composing the expression again;
    • #NUMBER! - displaying such a message means that you have some kind of problem with the arguments or with the result of the formula. For example, the number turned out to be too large or vice versa - small;
    • #DIV/0! - This error means that you are trying to write an expression that divides by zero. Excel cannot undo math rules. Therefore, such actions are also prohibited here;
    • #N/A! - The editor can show this message if some value is not available. For example, if you use the functions SEARCH, SEARCH, MATCH, and Excel did not find the fragment you are looking for. Or there is no data at all and the formula has nothing to work with;
    • If you are trying to calculate something and Excel writes the word #REF!, then the wrong range of cells is used in the function argument;
    • #EMPTY! - this error appears if you have an inconsistent formula with overlapping ranges. More precisely, if in reality there are no such cells (which are at the intersection of two ranges). Quite often, this error occurs by accident. It is enough to leave one space in the argument, and the editor will perceive it as a special operator (we talked about it earlier).

    When editing the formula (the cells are highlighted) you will see that they do not actually intersect.

    Sometimes you can see a lot of # characters that completely fill the width of the cell. In fact, there is no error here. This means that you are working with numbers that do not fit in this cell.

    In order to see the value contained there, it is enough to resize the column.

    In addition, you can use cell formatting. To do this, you need to follow a few simple steps:

    1. Call the context menu. Select Format Cells.
    1. Specify the type "General". Use the "OK" button to continue.

    Thanks to this, the Excel editor will be able to translate this number into another format that fits in this column.

    Formula Usage Examples

    The Microsoft Excel editor allows you to process information in any way convenient for you. There are all necessary conditions and opportunities for this. Let's look at some examples of formulas by categories. This will make it easier for you to figure it out.

    In order to evaluate the mathematical capabilities of Excel, you need to perform the following steps.

    1. Create a table with some conditional data.
    1. To calculate the amount, enter the following formula. If you only want to add one value, you can use the addition ("+") operator.
    =SUM(B3:C3)
    1. Oddly enough, in the Excel editor you can not take away using functions. For deduction, the usual operator "-" is used. In this case, the code will be the following.
    =B3-C3
    1. In order to determine how much the first number is from the second as a percentage, you need to use this simple construction. If you want to subtract several values, you will have to write a "minus" for each cell.
    =B3/C3%

    Note that the percent symbol is placed at the end, not at the beginning. In addition, when working with percentages, you do not need to additionally multiply by 100. This happens automatically.

    1. Excel can add, taking into account several conditions at once. You can calculate the sum of the cells in the first column, the value of which is greater than 2 and less than 6. And the same formula can be set for the second column.
    =SUMIFS(B3:B9,B3:B9,">2",B3:B9,"<6") =SUMIFS(C3:C9,C3:C9,">2",C3:C9,"<6")
    1. You can also count the number of elements that satisfy some condition. For example, let Excel calculate how many numbers we have greater than 3.
    =COUNTIF(B3:B9,">3") =COUNTIF(C3:C9,">3")
    1. The result of all formulas will be as follows.

    Math functions and graphs

    Using Excel, you can calculate various functions and build graphs on them, and then carry out graphical analysis. As a rule, such techniques are used in presentations.

    As an example, let's try to build graphs for the exponent and some equation. The instruction will be as follows:

    1. Let's create a table. In the first column we will have the original number "X", in the second - the "EXP" function, in the third - the specified ratio. It would be possible to make a quadratic expression, but then the resulting value against the background of the exponent on the graph would practically disappear.

    As we said earlier, the growth of the exponent is much faster than that of the usual cubic equation.

    Similarly, any function or mathematical expression can be represented graphically.

    Everything described above is suitable for modern programs of 2007, 2010, 2013 and 2016. The old Excel editor is significantly inferior in terms of features, number of functions and tools. If you open the official help from Microsoft, you will see that they additionally indicate in which version of the program this function appeared.

    In all other respects, everything looks almost exactly the same. As an example, let's calculate the sum of several cells. For this you need:

    1. Specify some data for calculation. Click on any cell. Click on the "Fx" icon.
    1. Select the "Math" category. Find the "SUM" function and click on "OK".
      1. You can try to recalculate in any other editor. The process will be exactly the same.

      Conclusion

      In this tutorial, we talked about everything related to formulas in the Excel editor, from the simplest to the very complex. Each section was accompanied by detailed examples and explanations. This is done so that the information is accessible even for complete dummies.

      If something does not work out for you, then you are making a mistake somewhere. Perhaps you have typos in expressions or incorrect cell references. The main thing to understand is that everything needs to be driven in very carefully and carefully. Moreover, all functions are not in English, but in Russian.

      In addition, it is important to remember that formulas must begin with the symbol "=" (equal to). Many novice users forget about it.

      Sample File

      In order to make it easier for you to deal with the formulas described earlier, we have prepared a special demo file in which all the above examples were compiled. You can do it from our site absolutely free. If during training you use a ready-made table with formulas based on the data you filled in, you will achieve results much faster.

      Video instruction

      If our description did not help you, try watching the attached video below, which tells the main points in more detail. Perhaps you are doing everything right, but you are missing something. With the help of this video, you should deal with all the problems. We hope these tutorials have helped you. Check us out more often.

    TEXT FUNCTIONS

    With text processing functions, you can use formulas to perform actions on lines of text, such as changing case or determining the length of a line. You can also combine multiple lines into one.

    For example, using the functions TODAY and TEXT you can create a message containing the current date and convert it to the form "dd-mmm-yy":

    ="Balance sheet from "&TEXT(TODAY(),"dd-mm-yy")

    CONCATENATE function concatenates multiple text lines into one.

    Syntax: CONCATENATE (text1; text2;...).

    From 1 to 30 text elements can be specified as arguments, combined into one text element.

    Instead of a function CONNECT You can use the & operator to concatenate texts.

    Examples: if cell A5 contains the value "Petrenko", then the function CONCATENATE("student", A5) will return the result "student Petrenko". The same result will be obtained if the expression = "student "&A5 is used.

    FIND function finds the occurrence of one text string (search_text) within another text string (lookup_text) and returns the position (i.e., character number) of the start of the search text, relative to the leftmost character of the search text.

    Syntax: FIND(search_text; search_text; start_position). In this case, start_position is the position of the character in the text being viewed, from which the search should begin. If this argument is omitted, it is assumed to be 1. The start_num argument can be used to skip the desired number of characters from the left edge of the text.

    Examples: FIND("e", "enterprise") will return 3 and FIND("e", "enterprise", 6) will return 11.

    To find occurrences of one text string within another text string, you can also use SEARCH function , but unlike the function SEARCH, function TO FIND is case sensitive and does not allow wildcard characters.

    Syntax: SEARCH (search_text; search_text; start_position).

    You can use wildcard characters in the search text: question mark? (matches any single character) and an asterisk * (matches any sequence of characters). If the search_text is not found, then the error value is returned. #VALUE!.

    Example: if cell B17 contains the word "income" and the cell A14SEARCH($B$17,$A$14) equals 7.

    Function SEARCH often used in conjunction with the REPLACE function, which replaces part of a text string with another text string.

    Syntax: REPLACE(old_text; start_number; number_characters; new_text).

    Old_text is the text in which it is desirable to replace some characters. Start_nom is the position of the character in old_text from which the replacement takes place. Number_of_characters is the number of characters in old_text that are replaced by new_text. new_text is text that replaces characters in old_text.

    Example: The following formula replaces the last two digits in the text 1990 with 91: REPLACE("1990", 3, 2, "91") equals "1991".

    Function Sharing Example SEARCH and REPLACE: if cell B17 still contains the word "income" and the cell A14 contains "Amount of Income", then REPLACE($A$14,SEARCH($B$17,$A$14),7,"Expenses") will return the text "Amount of Expenses". AT this example function SEARCH used to define functions REPLACE the correct value of the start_position argument from which to insert new text.

    In the event that it is necessary to replace certain text in a line with another piece of text, regardless of the number of its initial position, use SUBSTITUTE function. The function substitutes the new_text fragment for the old_text fragment in the specified first text string.

    Syntax: SUBSTITUTE(text; old_text; new_text; entry_number).

    In this case, the entry_number determines which occurrence of the fragment old_text should be replaced with new_text. If entry_number is specified, then only that occurrence of the fragment old_text is replaced. Otherwise, each occurrence of the old_text fragment in the text string is replaced by a new_text fragment.

    Example: if cell C3 contains the value "Annual Report", then SUBSTITUTE(C3, "Annual", "Weekly") equals "Weekly Report".

    MID function (substring) allows you to extract a piece of text of the specified length from the string, starting at the specified position.

    Syntax: MID(text; start_position; number_of_characters).

    Start_position specifies from which position the text fragment should be extracted. num_characters specifies how many characters to return.

    Examples: PSTR("Payroll";11;9) equals "statement", and MID("1234", 5, 5) equals "" (empty string).

    Function PSTR often used in conjunction with TO FIND to define the position from which to select a piece of text.

    To count the number of characters in a text, there is DLSTR function (line length).

    Syntax: DLSTR (text).

    Spaces are counted as characters.

    Examples: DLSTR ("Kharkiv - the first capital") returns 24 and DLSTR("") has a value of 0.

    EXACT function compares two lines of text and returns TRUE if they are exactly the same, FALSE otherwise. Function EXACT is case sensitive but ignores formatting differences. The EXACT function is used to check if some text is in a document.

    Syntax: EXACT(text1; text2).

    To convert all alphabetic characters in a string from lowercase to uppercase or vice versa, use respectively UPPER functions and LOWERLINE . To capitalize the first letter of each word PROPER function .

    Syntax: UPPER (text),

    LOWER (text), PROPER (text).

    It is often necessary to convert a numeric value to text using a given number format. For this it serves TEXT function .

    Syntax: TEXT(value; format).

    The format must be specified in text form (from the tab Number dialogue Format cells). The format cannot contain an asterisk (*) and cannot be General numeric format.

    Examples: if in cells A6 and A7 respectively contains the values ​​2.715 and "15.4.91", then TEXT (A6; "UAH 0.00") equals "UAH 2.72", and the result of the function TEXT(A7, "D MMM, YYYY") will be "Apr 15, 1991".

    Comment: cell formatting only changes the format, not the value. Function use TEXT converts the value to formatted text, and the result is no longer counted as a number.

    Excel is necessary in cases where you need to organize, process and save a lot of information. It will help automate calculations, make them easier and more reliable. Formulas in Excel allow you to carry out arbitrarily complex calculations and get results instantly.

    How to write a formula in Excel

    Before learning this, you should understand a few basic principles.

    1. Each starts with an "=" sign.
    2. Values ​​from cells and functions can participate in calculations.
    3. Operators are used as the mathematical signs of operations that are familiar to us.
    4. When you insert an entry, the default cell reflects the result of the calculation.
    5. You can see the design in the line above the table.

    Each cell in Excel is an indivisible unit with its own identifier (address), which is denoted by a letter (column number) and a number (row number). The address is displayed in the field above the table.

    So, how to create and insert a formula in Excel? Proceed according to the following algorithm:


    Designation Meaning

    Addition
    - Subtraction
    / Division
    * Multiplication

    If you need to specify a number, not a cell address, enter it from the keyboard. To enter a negative sign in an Excel formula, press "-".

    How to enter and copy formulas in Excel

    They are always entered after pressing "=". But what if there are many similar calculations? In this case, you can specify one, and then just copy it. To do this, enter the formula, and then "stretch" it in the right direction to multiply.
    Set the pointer to the copied cell and move the mouse pointer to the lower right corner (on the square). It should take the form of a simple cross with equal sides.


    Press the left button and drag.


    Release when you want to stop copying. At this point, the calculation results will appear.


    You can also stretch to the right.
    Move the pointer to the next cell. You will see the same entry, but with different addresses.


    When copying in this way, the line numbers increase if the shift is down, or the column numbers increase if to the right. This is called relative addressing.
    Let's enter the value of VAT into the table and calculate the price with tax.


    The price with VAT is calculated as the price*(1+VAT). Enter the sequence in the first cell.


    Let's try to copy the record.


    The result is strange.


    Let's check the content in the second cell.


    As you can see, when copying, not only the price shifted, but also VAT. And we need this cell to remain fixed. Fix it with an absolute link. To do this, move the pointer to the first cell and click on the address B2 in the formula bar.


    Press F4. The address will be diluted with a "$" sign. This is the sign of an absolutely cell.


    Now after copying the address B2 will remain unchanged.
    If you accidentally entered data in the wrong cell, just transfer it. To do this, move the mouse pointer over any border, wait until the mouse looks like a cross with arrows, press the left button and drag. In the right place, just release the manipulator.

    Using Functions for Calculations

    Excel offers a large number of functions that are categorized. You can view the full list by clicking on the Fx button next to the formula bar or by opening the "Formulas" section on the toolbar.


    Let's talk about some of the features.

    How to Set "If" Formulas in Excel

    This function allows you to set a condition and perform a calculation depending on whether it is true or false. For example, if the quantity sold is more than 4 packs, more should be purchased.
    To insert the result depending on the condition, let's add one more column to the table.


    In the first cell under the heading of this column, set the pointer and click the "Logical" item on the toolbar. Let's select the "If" function.


    As with inserting any function, a window will open to fill in the arguments.


    Let's specify a condition. To do this, click on the first row and select the first cell "Sold". Next, put the sign ">" and indicate the number 4.


    In the second line we will write "Purchase". This inscription will appear for those products that have been sold out. The last line can be left blank, since we have no action if the condition is false.


    Click OK and copy the entry for the entire column.


    So that the cell does not display "FALSE", open the function again and fix it. Place the pointer on the first cell and press Fx next to the formula bar. Insert the cursor on the third line and put a space between the quotation marks.


    Then OK and copy again.


    Now we see which product should be purchased.

    formula text in excel

    This feature allows you to apply a format to the contents of a cell. In this case, any data type is converted to text, and therefore cannot be used for further calculations. Let's add a column to format the total.


    In the first cell, enter a function (the "Text" button in the "Formulas" section).


    In the arguments window, specify a link to the cell of the total amount and set the format to "#RUB".


    Click OK and copy.


    If we try to use this amount in calculations, we will get an error message.

    "VALUE" means that calculations cannot be made.
    You can see examples of formats in the screenshot.

    Date Formula in Excel

    Excel provides many options for working with dates. One of them, DATE, allows you to build a date from three numbers. This is useful if you have three different columns - day, month, year.

    Place the pointer on the first cell of the fourth column and select a function from the "Date and Time" list.

    Arrange the cell addresses accordingly and click OK.


    Copy the entry.

    AutoSum in Excel

    In case you need to fold big number data, Excel provides the SUM function. For example, let's calculate the amount for sold goods.
    Put the pointer in cell F12. It will calculate the total.


    Go to the Formulas panel and click AutoSum.


    Excel will automatically highlight the nearest numeric range.


    You can select a different range. In this example, Excel did everything right. Click OK. Pay attention to the contents of the cell. The SUM function was substituted automatically.


    When inserting a range, specify the address of the first cell, a colon, and the address of the last cell. ":" means "Take all cells between the first and last. If you need to list multiple cells, separate their addresses with a semicolon:
    SUM (F5;F8;F11)

    Working with formulas in Excel: an example

    We told you how to make a formula in Excel. This is the kind of knowledge that can be useful even in everyday life. You can manage your personal budget and control expenses.


    The screenshot shows the formulas that are entered to calculate the amounts of income and expenses, as well as the calculation of the balance at the end of the month. Add sheets to the workbook for each month if you don't want all the tables to be on the same table. To do this, simply click on the "+" at the bottom of the window.

    To rename a sheet, double-click on it and enter a name.

    The table can be made even more detailed.
    Excel is very useful program, and calculations in it give practically unlimited possibilities.

    Have a great day!

    Devices