Tự động sắp xếp theo định dạng yêu cầu:

Tự động sắp xếp dữ liệu theo định dạng yêu cầu trong Excel

English:

Automatic data sorting in Excel based on required format

Introduction

Excel is a powerful tool for managing data. One of the most common tasks in Excel is to sort data. Sorting data can help you to organize your data and make it easier to find the information you need.

In Excel, you can sort data manually or automatically. Manual sorting is when you select the data you want to sort and then use the Sort button on the Data tab. Automatic sorting is when you use a formula or a function to sort data.

In this article, we will discuss how to automatically sort data in Excel based on a required format.

How to sort data in Excel based on a required format

To sort data in Excel based on a required format, you can use the SORT function. The SORT function takes three arguments:

Array: The range of cells that you want to sort.

Sort by: The column or row that you want to sort by.

Order: The order in which you want to sort the data.

For example, to sort the data in the range A1:D10 by the value in column A in ascending order, you would use the following formula:

=SORT(A1:D10,1,1)

This formula would return the following results:

A | B | C | D

— | — | — | —

1 | 2 | 3 | 4

5 | 6 | 7 | 8

9 | 10 | 11 | 12

Additional arguments

The SORT function also has two additional arguments:

By column: This argument allows you to sort data by multiple columns. To use this argument, you would specify a comma-separated list of columns to sort by.

Sort order: This argument allows you to specify the order in which you want to sort data for each column. To use this argument, you would specify a number between 1 and 4.

For example, to sort the data in the range A1:D10 by the value in column A in ascending order, then by the value in column B in descending order, you would use the following formula:

=SORT(A1:D10,1,1,2,-1)

This formula would return the following results:

A | B | C | D

— | — | — | —

9 | 10 | 11 | 12

5 | 6 | 7 | 8

1 | 2 | 3 | 4

Conclusion

By using the SORT function, you can easily sort data in Excel based on a required format. This can help you to organize your data and make it easier to find the information you need.

Leave a Comment

All in one