Business data analysis from entry to entry (3) Excel advanced application

1. Data classification and verification

1. Classification and summary

The data in Excel can be combined to achieve folding part of the data, and the data can also be opened, as follows:
excel data group

If you need to obtain data for testing and learning, you can directly click Add QQ group Python Geek Tribe963624318 , and download it in the group folder business data analysis from entry to entry .

In many cases, it is necessary to summarize a certain type of data, such as the total sales of orders classified as Technology, as follows:
excel subtotal simple

As you can see, to sort and summarize , you need to sort first ;
after the classification is completed, the combination is automatically realized, and it is divided into 3 levels, the first level is the total sales of all rows, and the second level is the sales summary of the three product categories. Level 3 is all order information;
if you want to copy the summary results to other places, you need to select visible cells in the targeting conditions .

You can also delete subtotals, as follows:
excel subtotal simple delete

You can also perform multiple summaries, as follows:
excel subtotal multi column

Subtotals can automatically generate a column of data, which can locate cells more quickly.

This can be applied to merge multiple rows of cells, as follows:
excel subtotal cell combine

Obviously, the desired effect was achieved.

2. Data Validity and Protection Worksheet

You can also restrict the data input, if it is illegal, the input is not allowed. At this time , the validity of the data needs to be verified .
as follows:
excel data effectiveness

As you can see, you can limit the value range;
you can provide options for selection;
you can limit the number of digits;
you can also modify the prompt pop-up box;
at the same time, the input limit will only be triggered when you input or edit.

This feature can be used to restrict other users from rewriting data, that is, to protect the worksheet, as follows:
excel data edit limit

Obviously, if the data is modified at this time, an error will be reported.

Two, formulas and functions

1. Basic use of formulas and functions

=Start with the formula and simply use it as follows:
excel formula function = simple

It can be seen that the addition of two numbers is realized, but when there are a lot of numbers to be added, it will obviously be troublesome if you manually enter them.
At this time, you need to use a new tool for calculations, that is, functions, such as summation, use sum()functions, as follows:
excel formula function = multi

It can be seen that not only the sum calculation is supported, but after the data is changed, the result will also change synchronously, and the function can be copied to other locations.

The components of an Excel formula:
functions, references, operators and constants.
For example, for the formula =PI()*A@^2: the
components include:

  • Function
    If the PI()function returns pi value 3.14159...
  • Reference
    such as A2 returns the value in cell A2.
  • Constant
    A number or text value entered directly into a formula, such as 2.
  • The operator
    ^ operator represents the power of numbers, and the * operator represents the product of numbers.

&Is a hyphen, you can connect two texts, as follows:
excel formula function & text link

There are also true and false in Excel, namely TRUE and FALSE, TRUE corresponds to 1, and FALSE corresponds to 0.

Assign different values ​​to a column according to the conditions, as follows:
excel formula function true false quote

It can be seen that TRUE and FALSE can participate in calculations;
when using the values ​​in the table instead of constants for calculations, there is a problem of reference. The default is generally relative reference, that is, the data of the same row and corresponding column is generally used when filling , Such as =(A3<>"中部地区")*8+K3, =(A4<>"中部地区")*8+K4and K4the value of the position is empty at this time, and the value defaults to 0, so the result is 8.
At this time, if you want to achieve the goal, you need to use an absolute reference, that is, use K3the value of the position, which only needs to be before the rank Just add a $symbol, you can select it and K3press the shortcut key F4to realize it, and it becomes =(A3<>"中部地区")*8+$K$3, =(A4<>"中部地区")*8+$K$3etc.

Mixed references can also be made, that is, only one of the rows and columns of the position changes, the other does not change, and the ones that do not change are $modified.
as follows:
excel formula function quote mixed

Obviously, printing the nine-nine-nine multiplication table is achieved through mixed references.

The basic usage of the function is as follows:
excel formula function base operation

Calculate and fill in empty values ​​as follows:
excel formula function compute fill

Obviously, the value to be filled is the second number from the left divided by the first number from the left, so it can be calculated all at once.

But in many cases, the data is not distributed in this way, you have to be flexible, as follows:
excel formula function sum auto

As you can see, the automatic summation tool is used at this time.

2. Logic judgment IF

Before judging whether it is the central region and calculating according to two situations, it is realized by using TRUE and FALSE, or by using IF.

The simple use of if judgment is as follows:
excel logic judge if simple

It can be seen that if the area is the central region, the sales unit price is the recommended unit price, otherwise it is the recommended unit price + 8.

It can also be nested:
excel logic judge if nesting

You can also do more complex nesting, as follows:
excel logic judge if nesting complex

Obviously, the result of if can be added and other operations.

In addition to using if nesting, you can also use hyphens &, as follows:
excel logic judge if nesting &

Obviously, the hyphen can also achieve the same effect, and logical operations and AND operations are used .

Sometimes when an error occurs, an error message appears, can be adjusted according to need, use IFERROR, IFNA, ISERRORand so on.
as follows:
excel logic judge if iferror

Now take retirement as an example to further illustrate the optimization of logical judgment: the
retirement age of enterprise employees is 60 years old for males;
female workers over 50 years old and female cadres over 55 years old.

Then there may be the following situations:
male employees over 60 years old, retire;
male employees under 60 years old, do not retire;
female employees over 50 years old, retire;
female employees under 50 years old, do not retire;
female cadres over 55 years old, retire;
Female cadres under the age of 55 do not retire;

To use general if judgments, you may have to nest many if statements, but in fact it can be simplified, because the essence of IF judgment is that the condition is TRUE to execute one case and FALSE to execute another case, so you can simply retire retirement and retirement is not divided or not, wherein the >60岁且是 男person >50岁且是女职工or >55岁且是女干部belong to retirement, the retirement does not belong to the other, this case may be as follows:
excel logic judge if two sides

Therefore, this method can be used when the final result is only two cases.

3.COUNTIF

COUNTIFIt is used to count according to conditions, and count if a certain condition is met, otherwise it will not count. Similar usage also includes COUNTIFS, SUMIFetc.

Simple use is as follows:
excel logic judge countif simple

The more complicated conditions used in counting are as follows:
excel logic judge countif condition

Obviously, when there are multiple conditions, you can count separately and then perform arithmetic calculations.

It can also be used when there are multiple conditions to be met COUNTIFS, as follows:
excel logic judge countif countifs

You can count based on multiple conditions at this time.

4. COUNTIF application

Repeat verification

Many times there will be duplicate data, which can count the data, if the count is greater than 1, it means that there has been duplication.

as follows:
excel repeat countif

It can be seen that the data is text data. When counting, it will be counted according to the first 15 digits. Therefore, it will be repeated when counting A3, A11, and A12. In this case, it can be solved by connecting wildcards in the back.

You can also restrict input duplicate data, which is achieved in conjunction with data verification, as follows:
excel repeat countif norepeat

Registration Statistics

There is a contact list, some of which have been registered, and there are corresponding lists. According to the registered list, all the contact lists are counted. Whether to register is as follows:
excel application enroll is_enrolled

Obviously, it will be automatically counted whether to sign up or not;
this is achieved through the use of IFand COUNTIFcombined with various tools in Excel can achieve very rich functions.

You can also fill the color, you need to use the conditional format :
excel application enroll condition style

It can be seen that the data that meets the conditions are filtered;
at the same time, when the data changes, the results will also change simultaneously.

5.SUMIVE

And COUNTIFsimilar, the SUMIFsum is based on the conditions, simply use as follows:
excel sumif simple

When the column of the data to be summed and the column of the condition are not the same column, it is a little more complicated, as follows:
excel sumif different column

Obviously, 3 parameters need to be passed at this time to sum.

You can also perform summation based on multiple conditions. There are many ways. One way is to add two auxiliary column splicing conditions, and then perform the summation, as follows:
excel sumif multi condition new line

As you can see, the calculated result depends on the auxiliary column. If the auxiliary column is deleted or modified, the result will also change.

Another way is to use the SUMIFSfunction directly , as follows:
excel sumif multi condition sumifs

Obviously, the same result was obtained.

It can also be used more flexibly, such as abbreviated parameters , as follows:
excel sumif shorten params

At this time, the result can also be obtained. This abbreviation can only be done by selecting all the data in this range. Under normal conditions, this method should be chosen carefully.

For a certain inventory, it is necessary to limit the shipment volume not to exceed the inventory. This can also be achieved through the SUMIFfollowing:
excel sumif storage verify

Obviously, SUMIFthe effect of restricting input is achieved.

Three, the use of VLOOKUP

1. Basic usage of VLOOKUP

The VLOOKUP function in Excel is generally used to find content by row in a table or area , as follows:

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

The meaning is as follows:

VLOOKUP (what you want to find, the location to find, the column number in the area containing the value to be returned, return approximate or exact match-expressed as 1/TRUE or 0/FALSE)

In layman's terms, the parameters are what to look for, where to look, specific results, accurate/fuzzy; it
will be searched from the leftmost column of the search area;
when there are multiple records that meet the conditions, only the first one that meets the conditions can be returned Record; the
area includes all search parts and result parts .

The simple usage is as follows:
excel vlookup simple

Another example:
excel vlookup simple 2

Obviously, search can be achieved.

Vlookup can also implement nested search , that is, to combine two table search, as follows:
excel vlookup join tables

Obviously, VLOOKUPthe joint search of the two tables is realized through nesting .

Multiple matching can also be achieved, that is, to find multiple conditions, which can be achieved by adding auxiliary columns , as follows:
excel vlookup multi match

It should be noted that the auxiliary column must be added to the first column, otherwise the search will fail.

2. Search across tables and files

VLOOKUPCross-table search can also be implemented , that is, the query involves two or more worksheets.
as follows:
excel vlookup cross table

Sometimes the data to be queried cannot be completely matched in the selected range, but only part of it. In this case, you can choose to splice wildcard strings .
as follows:
excel vlookup cross table &

In addition to cross-table, you can also achieve cross-file , as follows:
excel vlookup cross file

3. Fuzzy search

The previous search methods are all exact search, that is, the last parameter is 0, in fact, it can also be 1, that is, fuzzy search.

Fuzzy search can be used for interval search . The interval is required to be ordered. The principle of search is binary search.
as follows:
excel vlookup fuzzy match

It can also be used for labeling, as follows:
excel vlookup tag

4. Text VLOOKUP and HLOOKUP

When searching, if there are numbers in the form of text in the data being searched or in the selected area, type conversion is required. For example, when a
number is converted to text, connect an empty string with a hyphen; when the
text is converted to a number, with *1, +0, --etc.

as follows:
excel vlookup text

Obviously, it is achieved through the if conditional judgment;
at the same time, the data type needs to be converted.

In addition to VLOOKUP for vertical search , and HLOOKUP for horizontal search , the two can be used in combination.
as follows:
excel vlookup hlookup

Obviously, after using HLOOKUP, synchronous updates can be achieved.

5.Match and Index

MatchAnd VLOOKUPused similarly, it returns the serial number of rows and columns;
Indexused to locate data in accordance with the rows and columns;
both may be used in conjunction with the first Matchlocation, and then Indexto find, than VLOOKUPapplied wider, can reverse lookup, i.e. The data to be searched is not in the first column of the selected area.

The simple use of the two is as follows:
excel vlookup match index

The combination of the two is as follows:
excel vlookup match index combine

At this time, you can find the front through the back to avoid the VLOOKUPrestrictions.

6. Return multiple columns

VLOOKUPIt can also be Matchused in combination to achieve the effect of returning multiple columns.
as follows:
excel vlookup match combine

It should be noted that mixed references must be used here , otherwise errors will occur.

Another example:
excel vlookup match multi line

VLOOKUPGenerally, only the first piece of data that is queried will be returned, but the auxiliary column can be added to sort the same data and splice into a unique value to meet VLOOKUPthe conditions.
as follows:
excel vlookup match repeat

7. Array and multiple matching

VLOOKUPThe multiple matching achieved by using an array is as follows:
excel vlookup multi match &

It should be noted that at this time, because the array is involved, you cannot directly press it Ctrl, but it should be Ctrl+Shift+Enter, so that the value can be queried normally;
=VLOOKUP(E4&F4,IF({1,0},A2:A13&B2:B13,C2:C13),2,0)middle, IF({1,0},A2:A13&B2:B13,C2:C13)that is, an array containing two columns, the first column is the connection of column A and column B, and the second column It is column C, as follows:
excel vlookup multi match & array

As you can see, two-column arrays are implicitly generated using formulas and functions.

You can also generate other forms of arrays, as follows:
excel vlookup array matrix

It should be noted that they are all Ctrl+Shift+Enterobtained by pressing .

This can be used to find the sum of the product of each row without first calculating the product of each row, as follows:
excel vlookup array sum

Guess you like

Origin blog.csdn.net/CUFEECR/article/details/108596160