메인 컨텐츠로 가기

긴 목록을 Excel에서 동일한 그룹으로 분할하는 방법은 무엇입니까?

문서 분할 목록을 그룹 4로

다음 스크린 샷과 같이 여러 개의 동일한 그룹으로 분할해야하는 긴 데이터 목록이있는 경우 Excel에서이 작업을 어떻게 빠르고 쉽게 처리 할 수 ​​있습니까?

VBA 코드를 사용하여 긴 목록을 여러 개의 동일한 그룹으로 분할

Excel 용 Kutools를 사용하여 긴 목록을 여러 개의 동일한 그룹으로 분할


데이터를 하나씩 복사하여 붙여 넣는 것을 제외하고 다음 VBA 코드도 도움이 될 수 있습니다. 다음 단계를 수행하십시오.

1. 누르고 ALT + F11 키를 눌러 응용 프로그램 용 Microsoft Visual Basic 창.

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

VBA 코드 : 긴 목록을 여러 개의 동일한 그룹으로 분할

Sub SplitIntoCellsPerColumn()
'updateby Extendoffice
    Dim xRg As Range
    Dim xOutRg As Range
    Dim xCell As Range
    Dim xTxt As String
    Dim xOutArr As Variant
    Dim I As Long, K As Long
    On Error Resume Next
    xTxt = ActiveWindow.RangeSelection.Address
Sel:
    Set xRg = Nothing
    Set xRg = Application.InputBox("please select data range:", "Kutools for Excel", xTxt, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    If xRg.Areas.Count > 1 Then
        MsgBox "does not support multiple selections, please select again", vbInformation, "Kutools for Excel"
        GoTo Sel
    End If
    If xRg.Columns.Count > 1 Then
        MsgBox "does not support multiple columns,please select again", vbInformation, "Kutools for Excel"
        GoTo Sel
    End If
    Set xOutRg = Application.InputBox("please select a cell to put the result:", "Kutools for Excel", , , , , , 8)
    If xOutRg Is Nothing Then Exit Sub
    I = Application.InputBox("the number of cell per column:", "Kutools for Excel", , , , , , 1)
    If I < 1 Then
        MsgBox "incorrect enter", vbInformation, "Kutools for Excel"
        Exit Sub
    End If
    ReDim xOutArr(1 To I, 1 To Int(xRg.Rows.Count / I) + 1)
    For K = 0 To xRg.Rows.Count - 1
      xOutArr(1 + (K Mod I), 1 + Int(K / I)) = xRg.Cells(K + 1)
    Next
    xOutRg.Range("A1").Resize(I, UBound(xOutArr, 2)) = xOutArr
End Sub

3. 그런 다음 F5 이 코드를 실행하려면 키를 누르고 팝업 상자에서 여러 그룹으로 분할 할 열을 선택하십시오. 스크린 샷을 참조하십시오.

문서 분할 목록을 그룹 1로

4. 클릭 OK 버튼을 누른 다음 다음 프롬프트 상자에서 결과를 찾을 셀을 선택합니다. 스크린 샷을 참조하십시오.

문서 분할 목록을 그룹 2로

5. 딸깍 하는 소리 OK, 프롬프트 상자에 열당 분할하려는 셀 수를 입력하십시오. 스크린 샷을 참조하십시오.

문서 분할 목록을 그룹 3로

6. 마지막으로 OK 코드를 완료하고 선택한 목록 데이터가 필요에 따라 여러 개의 동일한 그룹으로 분할되었습니다. 스크린 샷을 참조하십시오.

문서 분할 목록을 그룹 4로


설치 한 경우 Excel 용 Kutools그와 변형 범위 기능을 사용하면 긴 목록을 여러 열과 행으로 빠르게 분할 할 수 있으며 여러 열을 하나의 긴 목록으로 결합 할 수도 있습니다.

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

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

1. 분할 할 긴 목록을 선택한 다음 쿠툴 > 범위 > 변형 범위, 스크린 샷 참조 :

2. 에서 변형 범위 대화 상자에서 범위에 대한 단일 열 아래 변형 유형 섹션을 확인한 다음 고정 가치 상자에서 행당 셀 수를 지정합니다. 스크린 샷 참조 :

문서 분할 목록을 그룹 7로

3. 그런 다음 Ok을 클릭하고 프롬프트 상자에서 결과를 찾을 셀을 선택합니다. 스크린 샷을 참조하십시오.

문서 분할 목록을 그룹 8로

4. 그리고 OK 버튼을 누르면 목록의 데이터가 필요에 따라 여러 개의 동일한 그룹으로 분할되었습니다.

Excel 용 Kutools를 지금 다운로드하고 무료로 평가하십시오!


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

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
the code works great for me. How do I change it from asking how many in each colum to how many columns needed? so that it equally divides the information into a set number of columns.
This comment was minimized by the moderator on the site
Hello, trinetta,
May be the following article can help you, in that article, there are some formulas may meet your need. Please check it:
https://www.extendoffice.com/documents/excel/681-excel-change-columns-to-rows.html
This comment was minimized by the moderator on the site
The link only tells me how to do the same thing. It doesnt tell me how to tell the code or formula how many columns i need...just how many in each column.
This comment was minimized by the moderator on the site
Hi, Tpdixon,
In that article, the formula: =OFFSET($A$1,COLUMNS($A1:A1)-1+(ROWS($1:1)-1)*5 can help you to split the list into mulitiple columns, you just need to change the number 5 to other number you need, it represents the column number.
After entering this formula, you should drag the fill handle acrross to right with 5 cells.
Please try, thank you!
This comment was minimized by the moderator on the site
how can I change it from the number of cells per column to the number of columns needed. so that the data is split up evenly amongst a number of columns instead of picking how many to have in each column?
This comment was minimized by the moderator on the site
I copied the code and Excel 365 says syntax error.
This comment was minimized by the moderator on the site
This comes in very handy! One question: In the VBA code how can I transpose the output? So instead of xRg.Rows.Count / I = number of colums output, the output is generated as xRg.Rows.Count / I = number of rows output with I being the number of columns per row.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations