Bài 153: Cách xử lý chuỗi con trong Excel

dieuhuongngonha

New member
## Cách xử lý chuỗi con trong Excel

Trích xuất một chuỗi con từ một chuỗi trong Excel là một nhiệm vụ phổ biến.Bạn có thể sử dụng các chức năng bên trái, phải, giữa hoặc tìm để làm điều này.

Hàm bên trái trả về các ký tự ngoài cùng bên trái của chuỗi.Cú pháp là:

= Trái (chuỗi, số lượng ký tự)

Ví dụ: công thức sau đây trả về 5 ký tự đầu tiên của chuỗi "Hello World":

= Trái ("Hello World", 5)

Hàm đúng trả về các ký tự ngoài cùng bên phải của chuỗi.Cú pháp là:

= RIGHT (Chuỗi, số lượng ký tự)

Ví dụ: công thức sau đây trả về 5 ký tự cuối cùng của chuỗi "Hello World":

= Đúng ("Hello World", 5)

Hàm MID trả về một chuỗi con từ một chuỗi bắt đầu ở một vị trí được chỉ định.Cú pháp là:

= Mid (chuỗi, vị trí bắt đầu, số lượng ký tự)

Ví dụ: công thức sau sẽ trả về phần phụ từ ký tự thứ 5 cho ký tự thứ 10 của chuỗi "Hello World":

= Mid ("Hello World", 5, 10)

Hàm tìm trả về vị trí của một chuỗi con được chỉ định trong một chuỗi.Cú pháp là:

= Find (Subring, String)

Ví dụ: công thức sau đây trả về vị trí của lần xuất hiện đầu tiên của "Thế giới" trong chuỗi "Hello World":

= Tìm ("Thế giới", "Hello World")

Bạn có thể sử dụng các chức năng này để trích xuất một chuỗi con từ một chuỗi trong Excel.

## hashtags

* #Excel
* #Formulas
* #dây
* #SubStrings
* #DataExtraction
=======================================
## How to Process Substring in Excel

Extracting a substring from a string in Excel is a common task. You can use the LEFT, RIGHT, MID, or FIND functions to do this.

The LEFT function returns the leftmost characters of a string. The syntax is:

=LEFT(string, number of characters)

For example, the following formula returns the first 5 characters of the string "Hello World":

=LEFT("Hello World", 5)

The RIGHT function returns the rightmost characters of a string. The syntax is:

=RIGHT(string, number of characters)

For example, the following formula returns the last 5 characters of the string "Hello World":

=RIGHT("Hello World", 5)

The MID function returns a substring from a string starting at a specified position. The syntax is:

=MID(string, start position, number of characters)

For example, the following formula returns the substring from the 5th character to the 10th character of the string "Hello World":

=MID("Hello World", 5, 10)

The FIND function returns the position of a specified substring in a string. The syntax is:

=FIND(substring, string)

For example, the following formula returns the position of the first occurrence of the substring "World" in the string "Hello World":

=FIND("World", "Hello World")

You can use these functions to extract a substring from a string in Excel.

## Hashtags

* #Excel
* #Formulas
* #strings
* #SubStrings
* #DataExtraction
 
Join ToolsKiemTrieuDoGroup
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock