메인 컨텐츠로 가기

한 셀의 텍스트와 숫자를 두 개의 열로 분리하는 방법은 무엇입니까?

텍스트와 숫자로 구성된 텍스트 문자열 열이있는 경우 다음 스크린 샷과 같이 한 셀의 텍스트와 숫자를 두 개의 다른 셀로 분리하려고합니다. Excel에서는 이러한 방법으로이 작업을 완료 할 수 있습니다.


방법 1 : Excel에서 수식을 사용하여 텍스트와 숫자 구분

다음 수식을 사용하여 셀에서 텍스트와 숫자를 두 개의 분리 된 셀로 추출 할 수 있습니다. 다음과 같이하십시오 :

1. 결과를 넣을 빈 셀 C3에 다음 공식을 입력합니다. =LEFT(A3,MIN(찾기(0,1,2,3,4,5,6,7,8,9 {{}},A3&"0123456789"))-1)(A3 분리하려는 텍스트 문자열이 포함 된 셀)을 누른 다음 엔터 버튼 키를 눌러 A2 셀에서 텍스트 만 가져옵니다. 스크린 샷보기 :

문서 분할 텍스트 번호 2

2. 그런 다음 다음 공식을 적용하여 셀에서 숫자를 추출 할 수 있습니다. =오른쪽(A3,LEN(A3)-MIN(찾기(찾기)0,1,2,3,4,5,6,7,8,9 {{}},A3&"0123456789"))+1),( A3 분리하려는 텍스트 문자열이 포함 된 셀), 숫자를 넣을 D3 셀에이 수식을 입력하고 엔터 버튼 키를 누르면 다음과 같은 숫자가 표시됩니다.

문서 분할 텍스트 번호 3

3. 그런 다음 C3 : D3 셀을 선택하고 이러한 수식을 포함 할 셀로 채우기 핸들을 드래그하면 텍스트와 숫자가 서로 다른 셀로 분리 된 것을 볼 수 있습니다.

문서 분할 텍스트 번호 4


텍스트 문자열을 개별 텍스트 및 숫자 열로 분할 또는 분리 :

Excel 용 Kutools's 셀 분할 기능은 강력한 도구이며 셀 값을 여러 열 또는 행으로 분할하는 데 도움이 될 수 있으며 영숫자 문자열을 분리 된 텍스트 및 숫자 열 등으로 분할하는 데 도움이 될 수 있습니다. Excel 용 Kutools를 다운로드하려면 클릭하십시오!

문서 분할 텍스트 번호 16

방법 2 : Excel 2013 이상 버전에서 Flash Fill을 사용하여 텍스트와 숫자 분리

위의 공식을 사용하면 텍스트가 숫자 앞에 있으면 텍스트와 숫자를 분리 할 수 ​​있습니다. 텍스트 앞에 숫자가있는 텍스트 문자열을 분리하려면 다음을 사용할 수 있습니다. 플래시 채우기 Excel 2013 이상 버전의 기능입니다.

Excel 2013 이상 버전이있는 경우 플래시 채우기 기능은 한 열의 텍스트와 다른 열의 숫자를 채우는 데 도움이 될 수 있습니다. 다음과 같이하십시오.

1. 첫 번째 텍스트 문자열의 번호를 인접한 빈 셀 (B3)에 완전히 입력합니다 (스크린 샷 참조).

문서 분할 텍스트 번호 5

2. 그런 다음 숫자를 채울 B3 : B7 범위를 선택하고 Data > 플래시 채우기, 숫자 만 한 번에 셀에 채워졌습니다. 스크린 샷을 참조하십시오.

문서 분할 텍스트 번호 6

3. 그런 다음 텍스트 문자열을 셀 C3에 완전히 입력합니다. 스크린 샷을 참조하십시오.

문서 분할 텍스트 번호 7

4. 텍스트 만 채우려는 셀 범위 C3 : C7을 선택하고 Data > 플래시 채우기 2 단계뿐만 아니라 텍스트가 다음과 같이 구분되어있는 것을 볼 수 있습니다.

문서 분할 텍스트 번호 8

: 채워진 핸들을 사용하려는 범위로 드래그 한 다음 클릭 할 수도 있습니다. 자동 채우기 옵션 확인 플래시 채우기.

문서 분할 텍스트 번호 9

방법 3 : 사용자 정의 함수와 불규칙적으로 혼합 된 텍스트 및 숫자 분리

아래와 같은 데이터와 같이 비 정기적으로 텍스트와 숫자가 혼합 된 문자열이있는 경우 엑셀은이 문제를 해결하기위한 일반적인 기능을 지원하지 않지만이를 완료하기 위해 사용자 정의 함수를 만들 수 있습니다.

문서 분할 텍스트 번호 17

1. 누르고 ALT + F11 키를 눌러 Microsoft Visual Basic for Applications 창.

2. 딸깍 하는 소리 끼워 넣다 > 모듈을 클릭하고 다음 코드를 모듈 창.

VBA 코드 : 텍스트와 숫자를 한 셀에서 다른 셀로 분리

Public Function SplitText(pWorkRng As Range, pIsNumber As Boolean) As String
'Updateby Extendoffice
Dim xLen As Long
Dim xStr As String
xLen = VBA.Len(pWorkRng.Value)
For i = 1 To xLen
    xStr = VBA.Mid(pWorkRng.Value, i, 1)
    If ((VBA.IsNumeric(xStr) And pIsNumber) Or (Not (VBA.IsNumeric(xStr)) And Not (pIsNumber))) Then
        SplitText = SplitText + xStr
    End If
Next
End Function

3. 그런 다음이 코드를 저장하고 닫은 다음 워크 시트로 돌아가이 수식을 입력합니다. = SplitText (A3, FALSE) 빈 셀에 텍스트 문자열 만 가져온 다음 채우기 핸들을이 수식을 채우려는 셀로 드래그합니다. 스크린 샷을 참조하십시오.

문서 분할 텍스트 번호 10

4. 그리고 수식 입력 = SplitText (A3, TRUE) 다른 셀로 이동하고이 수식을 채우려는 셀로 채우기 핸들을 끌어 숫자를 가져옵니다. 스크린 샷을 참조하십시오.

문서 분할 텍스트 번호 11

주의 사항: 문자열에 XNUMX 진수가 있으면 결과가 정확하지 않습니다.


방법 4 : Excel 용 Kutools를 사용하여 텍스트와 숫자를 두 개의 열로 분리

당신이 있으면 Excel 용 Kutools, 강력한 도구로 셀 분할 유틸리티를 사용하면 텍스트 문자열을 두 개의 열로 빠르게 분할 할 수 있습니다. 하나는 숫자이고 다른 하나는 텍스트입니다.

설치 후 Excel 용 Kutools, 다음과 같이하십시오.

1. 텍스트와 숫자를 구분할 데이터 범위를 선택하십시오.

2. 그런 다음 쿠툴 > 병합 및 분할 > 셀 분할, 스크린 샷 참조 :

3. 에서 셀 분할 대화 상자에서 열로 분할 옵션 아래의 타입 섹션을 확인한 다음 텍스트 및 숫자 인사말 분할 기준 섹션, 스크린 샷 참조 :

문서 분할 텍스트 번호 13

4. 그런 다음 Ok 버튼을 클릭하면 결과를 출력 할 셀을 선택하라는 메시지 상자가 나타납니다. 스크린 샷을 참조하십시오.

문서 분할 텍스트 번호 14

5. 딸깍 하는 소리 OK 버튼을 클릭하고 선택 항목의 텍스트 문자열은 다음 스크린 샷과 같이 두 개의 열로 분리되었습니다.

문서 분할 텍스트 번호 15

Excel 용 Kutools 다운로드 및 지금 무료 평가판을 클릭하십시오!


Excel 용 Kutools로 텍스트와 숫자 분리

Excel 용 Kutools: 300 개 이상의 편리한 Excel 추가 기능으로 30 일 동안 제한없이 무료로 사용해 볼 수 있습니다. 지금 다운로드 및 무료 평가판!

관련 기사 :

Excel에서 단어를 개별 문자로 분할하는 방법은 무엇입니까?

캐리지 리턴으로 셀을 여러 열 또는 행으로 분할하는 방법은 무엇입니까?


 

  • Excel 용 Kutools : 무료 평가판의 Excel 용 300 개 이상의 편리한 기능

    300 개 이상의 스마트하고 전문적인 Excel 용 도구를 수집하여 일상 작업에서 몇 번의 클릭으로 다양한 종류의 복잡한 작업을 단순화하여 많은 시간을 절약하고 생산성을 높일 수 있습니다.

    • 여러 워크 시트 또는 통합 문서를 단일 통합 문서 또는 워크 시트로 결합
    • 배경, 글꼴 또는 조건부 서식 색상을 기반으로 셀 수 및 합계
    • 다른 첨부 파일을 사용하여 개별적으로 수신자 목록에 동일한 이메일을 보냅니다.
    • 110,000 명 이상의 Excel 사용자의 선택. 30 일 전체 기능 무료 평가판, 신용 카드 필요 없음!
    • 60 일 환불 보장!
    쿠툴 1 kutools 플러스
  • 여러 워크 시트 또는 통합 문서를 하나의 단일 시트 또는 통합 문서로 결합

    일상 업무에서 여러 워크 시트 또는 통합 문서를 하나의 시트 또는 통합 문서로 병합하는 것은 하나씩 결합하는 데 큰 도움이 될 수 있습니다. 하지만 함께 Excel 용 Kutools's 결합 기능을 사용하면 몇 번의 클릭만으로이 작업을 해결할 수 있습니다.

    시트 결합
  • 배경, 글꼴 또는 조건부 서식 색상을 기반으로 셀 수 및 합계

    넓은 범위의 배경, 글꼴 또는 조건부 서식 색상을 기반으로 셀 값을 계산하거나 합계하는 것은 어려운 작업 일 수 있습니다. Excel 용 Kutools 쉬운 도구를 지원합니다-색상으로 계산 Excel 기술 없이도 가능한 한 빨리이 작업을 처리하는 데 도움이 될 수 있습니다.

    색상으로 계산
  • 다른 첨부 파일을 사용하여 개별적으로 수신자 목록에 동일한 이메일을 보냅니다.

    Word 응용 프로그램을 적용하여 첨부 파일없이 여러 사람에게 개인화 된 전자 메일을 보낼 수 있지만 Excel 용 Kutools's 이메일 보내기 기능,이 limatation은 치료 될 수 있습니다. 동시에 특정 사람에게 메시지를 참조 또는 숨은 참조로 보낼 수도 있습니다.

    이메일을 보내라.

 

Comments (34)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Tenho uma coluna com vários endereços e os números de endereços. Conforme tabela abaixo. Como separo em uma coluna apenas os nomes e outra coluna apenas os números?

endereço
Avenida Angélica 1235
Rua José Maria Lisboa 456
Rua Celso de Azevedo Marques 307
Rua Rio Duas Barras 953
This comment was minimized by the moderator on the site
Hello, Mateus,
To extract the address number only from the address, the folloiwng formula may help you:
=SUMPRODUCT(MID(0&B3, LARGE(INDEX(ISNUMBER(--MID(B3, ROW(INDIRECT("1:"&LEN(B3))), 1)) * ROW(INDIRECT("1:"&LEN(B3))), 0), ROW(INDIRECT("1:"&LEN(B3))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(B3)))/10)

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Bom dia.
Consegui extrair o número, muito obrigado!
Mas como eu consigo extrair agora apenas o endereço?
This comment was minimized by the moderator on the site
Hello, Mateus,
If you want to extract both address and address number, you can apply the Method 3 in this article:

https://www.extendoffice.com/documents/excel/2701-excel-separate-text-and-numbers.html#a3

After copying and pasting the code, please apply the below formulas:
Extract address: =SplitText(B2,FALSE)

Extract address number: =SplitText(B2,TRUE)
Please try, hope it can help you! If you have any other problem, please comment here.
This comment was minimized by the moderator on the site
Agile (11/20/2017 12:00:00 AM)How can I separate this cell into just "Agile" and "(11/20/2017 12:00:00 AM)"
This comment was minimized by the moderator on the site
Hello, Milner,To get the name text, please use this formula: =TRIM(LEFT(A1, FIND("(", A1)-1))To get the date time, please apply this formula: =MID(A1,SEARCH("(",A1),SEARCH(")",A1)-SEARCH("(",A1)+1)Please try the formulas, hope them can help you!
This comment was minimized by the moderator on the site
0002786961 TRAK CDFA #: 0008787942 2722 2723 4536841 N/A 4345784 001018809~00077480

Above is an example of data line I need to split these into 3 types: First: starts with 2 and is of 4 digit (2722 in above example) Second: starts with 2 and is of 7 digit third; starts with 4 is of 7 digit.
I tried separating everything into different columns and then putting if and conditions that I mentioned above but the problem is not everything is getting separated and splitting everything is not efficient enough. I am not able to figure out a vba code for something that satisfies all the conditions and works too.
Can anyone help me out?
This comment was minimized by the moderator on the site
Hello, menze
Do you need to split this three parts 2722 2723 4536841 from the long data? If so, you just can use the Text to Column feature in Excel to split the content into multiple cells by space, then delete the extra data and only keep the data you need.
If not, please upload your Excel file or screenshot here for a reference.
Thank you!
This comment was minimized by the moderator on the site
I have a requirement code that I need to separate out from the text, looks like this 3.1.1.2. Line-of-sight Range Requirements (T=O) The vehicle and units shall be capable of line-of-sight connectivity to all nodes or within a 10-mile radius, whichever is greater. In one column I need the code and the other I need the text. Can you help?
This comment was minimized by the moderator on the site
I have address like 12,anna street,98413256789 i want to seperate address and contact number(mobile or landline) two columns. Is it possible.Pls help to solve
This comment was minimized by the moderator on the site
Hi, Mohan,To seperate address and contact number, please apply the below formulas:Address: =LEFT(A1,LEN(A1)-12)Mobile number: =RIGHT(A1,11)
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Please, help me with the VBA code required to take out "INC000010542805" out of "User KSmith Audit ID INC000010542805 Comment None Control Data".
I have 1,000 rows of this type of data with different number of characters but always with that "INC" string.
This comment was minimized by the moderator on the site
Hello, Kenny,
May be the below formula can solve your problem, please try:
=TRIM(LEFT(SUBSTITUTE(MID(A1,FIND("INC",A1),LEN(A1))," ",REPT(" ",100)),100))
This comment was minimized by the moderator on the site
skyyang thanks very much, it works. I really appreciate your help
This comment was minimized by the moderator on the site
how to separate number and letters (1122AB). I tried the upper formula but its not working with me. anybody help me in this regard. Thanks in advance
This comment was minimized by the moderator on the site
Hello, Naeem,
The above formula only works if the text is before the numbers, your numbers before the text, so i recommend the second and third method for you!
Please try, hope it can help you!
This comment was minimized by the moderator on the site
kereeeennn... berhasil....
This comment was minimized by the moderator on the site
Thanks worked for Alpha-numeric cell data [ =RIGHT(A2,LEN(A2)-MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))+1)]
This comment was minimized by the moderator on the site
Hello Can anyone help me? I want to remove this zero and braceket by an excel formula.
1 BR PE-0.50CT(H SI2)- -0.00( )-2 SP PE-0.50CT(H SI1)-1 RU PE-0.40CT(H-SI)-750GF-RG-RING-25-40-2.50GM


Gowtam
This comment was minimized by the moderator on the site
VERY USEFUL FORMULA I LIKE IT.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations