메인 컨텐츠로 가기

Word의 표에서 빈 행과 열을 제거하는 방법은 무엇입니까?

Word의 표에서 빈 행과 열을 모두 제거하려면 어떻게해야합니까? 이 튜토리얼은 Word 문서의 표에서 빈 행과 열을 제거하는 여러 방법을 보여줍니다.

테이블에서 모든 빈 행과 열을 수동으로 제거

VBA 코드를 사용하여 테이블에서 모든 빈 행과 열 제거

한 번의 클릭으로 테이블에서 모든 빈 행과 열 제거좋은 생각 3


테이블에서 모든 빈 행과 열을 수동으로 제거

Microsoft Office Word는 빈 행과 열을 제거하는 편리한 방법을 제공하지 않으므로 각 빈 행과 열을 수동으로 선택한 다음 하나씩 삭제하여 제거해야합니다.

1 단계 : 삭제할 빈 행 또는 빈 열을 선택합니다. 스크린 샷보기 :

문서 제거rowsandcols-1

3 단계 : Under 작업대 도구, 레이아웃 탭;

문서 제거rowsandcols-2

4 단계 : 행 및 열 그룹을 클릭하십시오. 행 삭제 또는 열 삭제.

문서 제거rowsandcols-3


VBA 코드를 사용하여 테이블에서 모든 빈 행과 열 제거

Word의 매크로 기능은 문서의 표에서 빈 행과 열을 모두 제거하는 훨씬 더 편리한 방법을 제공합니다. 다음과 같이 모든 빈 행과 열을 제거 할 수 있습니다.

1 단계 : 보도 자료 "Alt-F11" Microsoft Visual Basic for Application 창을 엽니 다.

2 단계 : 클릭 모듈 를 시청하여 이에 대해 더 많은 정보를 얻을 수 있습니다. 끼워 넣다 탭에서 다음 VBA 코드를 복사하여 모듈 창에 붙여 넣으십시오.

3 단계 : 그런 다음 달리기doc-reverse-sign-6 버튼을 눌러 VBA를 적용합니다.

테이블에서 모든 빈 행과 열을 제거하는 VBA 코드 :

Sub DeleteEmptyTablerowsandcolumns ()
Application.ScreenUpdating = False
테이블로 Dim Tbl, 셀로 셀, i만큼 길게, n만큼 길게, fEmpty As Boolean
ActiveDocument 사용
.Tables의 각 Tbl에 대해
n = Tbl.열.수
i = n의 경우 1 단계 -1
fEmpty = 참
Tbl. Column (i) .Cells의 각 셀에 대해
Len (cel.Range.Text)> 2 Then
fEmpty = 거짓
종료
END IF
다음 셀
fEmpty = True이면 Tbl.Columns (i) .Delete
다음 i
다음 Tbl

ActiveDocument 사용
.Tables의 각 Tbl에 대해
n = Tbl.Rows.Count
i = n의 경우 1 단계 -1
fEmpty = 참
Tbl.Rows (i) .Cells의 각 셀에 대해
Len (cel.Range.Text)> 2 Then
fEmpty = 거짓
종료
END IF
다음 셀
fEmpty = True이면 Tbl.Rows (i) .Delete
다음 i
다음 Tbl

Set cel = Nothing : Set Tbl = Nothing
Application.ScreenUpdating = True
최종 하위


한 번의 클릭으로 테이블에서 모든 빈 행과 열 제거

Word 용 Kutools는 문서의 표에서 모든 빈 행과 열을 제거하는 가장 편리한 방법을 제공합니다. 한 번만 클릭하면됩니다. Word 용 Kutools's Delete Rows/Columns 유틸리티는 모든 또는 selecetd 테이블에서 모든 빈 행과 열을 신속하게 제거합니다.

Word 용 Kutools, 이상과  편리한 기능으로 작업이 더 쉬워집니다. 

설치 후 Word 용 Kutools는 다음과 같이하십시오.(지금 Word 용 Kutools 무료 다운로드!)

1. 클릭 쿠툴즈 플러스 > Delete Rows/Columns 를 시청하여 이에 대해 더 많은 정보를 얻을 수 있습니다. Table 창유리.

doc 테이블 1에서 빈 행 열 제거

2. 그런 다음 대화 상자가 나타나면 찾는 위치 섹션에서 테이블을 제거 할 범위를 선택한 다음 옵션 및 빈 행 옵션 또는 확인 옵션 및 빈 행 당신이 필요로하는 선택권. 빈 행과 열을 모두 삭제하려면이 작업을 두 번 적용해야합니다.

doc kutools 빈 행 제거 2  doc kutools 빈 행 제거 3 

이제 얼마나 많은 테이블을 처리했는지 알려주는 대화 상자가 나타납니다. OK 닫고 빈 행과 열이 테이블에서 제거되었습니다.
doc kutools 빈 행 제거 4

팁.Excel 시트에서 빈 행을 제거하려면 빈 행 삭제 Excel 용 Kutools 유틸리티가 도움이 될 수 있습니다.

최고의 사무 생산성 도구

Word 용 Kutools - Over로 단어 경험을 향상시키세요 100 놀라운 기능!

🤖 Kutools AI 도우미: AI로 글쓰기를 변화시키세요 - 콘텐츠 생성  /  텍스트 다시 쓰기  /  문서 요약  /  정보 문의 문서 기반, 모두 Word 내에서

📘 문서 숙달: 페이지 분할  /  문서 병합  /  다양한 형식으로 선택 항목 내보내기(PDF/TXT/DOC/HTML...)  /  PDF로 일괄 변환  /  페이지를 이미지로 내보내기  /  한 번에 여러 파일 인쇄...

컨텐츠 편집: 일괄 찾기 및 바꾸기 여러 파일에 걸쳐  /  모든 사진 크기 조정  /  테이블 행과 열 바꾸기  /  표를 텍스트로 변환...

🧹 손쉬운 청소: 쓸어버리다 추가 공간  /  섹션 나누기  /  모든 헤더  /  텍스트 상자  /  하이퍼 링크  / 더 많은 제거 도구를 보려면 다음 페이지를 방문하세요. 그룹 제거...

광고 삽입물: 삽입 천 단위 구분 기호  /  확인란  /  라디오 버튼  /  QR 코드  /  바코드  /  대각선 표  /  방정식 캡션  /  이미지 캡션  /  테이블 캡션  /  여러 장의 사진  / 더 자세히 알아보세요. 그룹 삽입...

🔍 정밀한 선택: 핀포인트 특정 페이지  /  테이블  /  모양  /  제목 단락  / 탐색 기능 향상 배우기 기능 선택...

스타 강화: 어떤 위치로든 빠르게 이동  /  반복되는 텍스트 자동 삽입  /  문서 창 간을 원활하게 전환합니다.  /  11 변환 도구...

👉 이러한 기능을 사용해 보고 싶으신가요? Word 용 Kutools는 다음을 제공합니다. 60 일 무료 사용, 제한 없음! 🚀
 
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi
Many many thanks. Its 100% worked.
This comment was minimized by the moderator on the site
Hi, thanks for the CODE, it worked on a document with only one table.

but when launching it on a word document with different tables from different sizes, i got this error : "Run-time error '5992' Cannot access individual columns in this collection because the table has mixed cell widths"

Can anybody help, please
This comment was minimized by the moderator on the site
Bonjour,

Quand j'exécute le programme, l'erreur suivante s'affiche " Erreur de compilation : Instruction incorrecte à l'extérieur d'une procédure"

Quelqu'un a une solution s'il vous plait ?
This comment was minimized by the moderator on the site
I found this macro and it works great when it comes to a table with single empty rows.
Is it possible to change it to work on a table with split rows as well?
I would very much thank you if you have a solution for me.
This comment was minimized by the moderator on the site
Hi, shimon, I don't not understand your question, please give me examples or describe the question with more details.
This comment was minimized by the moderator on the site
You just saved me a zillion hours of frustration, THANK YOU!
This comment was minimized by the moderator on the site
u know you can just resize the table right? just filter and sort your data to top check how many rows have data, click table tools and the click resize and adjust the last number to whatever you need OR go to the bottom of the table the very last cell and use the tine blue triangle to drag and resize,
This comment was minimized by the moderator on the site
Except I have multiple page document with a table with varying information in each. Furthermore, it is a merge document so different each week. I need an automated method :)
This comment was minimized by the moderator on the site
Hi, the macro is working, BUT:

After deleting all rows, all the columns of the tables with empty rows open up very wide.

How can i fix the code so that this does not happens?


I am using Office 2016.


Thank you!
This comment was minimized by the moderator on the site
Hi All, I am looking for function in word wherein, if I remove specific word then it should remove that row as well.
This comment was minimized by the moderator on the site
Thanks for the code, really useful.
This comment was minimized by the moderator on the site
Is there a macro that will delete a row if only one of the cells in that row is empty or contains a zero?
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