[엑셀] 셀병합된 셀만 선택하기 > information

본문 바로가기
사이트 내 전체검색

information

[엑셀] 셀병합된 셀만 선택하기

페이지 정보

작성자 서방님 댓글 0건 조회 328회 작성일 14-12-03 16:36

본문

You can identify and select all merged cells in active worksheet by Find command with following steps:

Step 1: Click the Home >> Find & Select >> Find to open the Find and Replace dialog box. You can also open the Find and Replace dialog box with pressing theCtrl + H keys.

Step 2: Click the Format button in the dialog box. See the following screenshot:

shot-identify-merged-cell-4.png

If you can't find out the Format button, please click the Option button first.

Step 3: In the popping up Find Format dialog box, only check the Merge Cells option in the Text control section under Alignment tab, and click OK.

shot-identify-merged-cell-5.png

Step 4: Now you go back to the Find and Replace dialog box, click Find All button.

Step 5: All merged cells are listed at the bottom of this dialog box. Select all finding results with holding down the Ctrl key or Shift key.

Now all merged cells in active sheet are selected when you select all finding results. See the following screenshot:

shot-identify-merged-cell-6.png

If you want to only identify, find, and select merged cells in a selection, you need to select the range first.


arrow blue right bubbleIdentify merged cells with VBA

VBA 1: Identify merged cells

Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

Step 2: Click Insert >> Module, and paste the following macro in the Module Window.

Sub FindMerged2()
Dim c As Range
For Each c In ActiveSheet.UsedRange
If c.MergeCells Then
c.Interior.ColorIndex = 36
End If
Next
End Sub

Step 3: Press the F5 key to run this macro.

This Macro will highlight all merged cells in active worksheet, see the following screenshot:

shot-identify-merged-cell-7.png

VBA 2: Identify merged cells

Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

Step 2: Click Insert >> Module, and paste the following macro in the Module Window.

Sub FindMerged4()
Dim c As Range
Dim sMsg As String
sMsg = ""
For Each c In ActiveSheet.UsedRange
If c.MergeCells Then
If sMsg = "" Then
sMsg = "Merged worksheet cells:" & vbCr
End If
sMsg = sMsg & Replace(c.Address, "$", "") & vbCr
End If
Next
If sMsg = "" Then
sMsg = "No merged worksheet cells."
End If
MsgBox sMsg
End Sub

Step 3: Press the F5 key to run this macro.

This VB macro will list all merged cells in a popping up dialog box. See the following screenshot:

shot-identify-merged-cell-8.png


arrow blue right bubbleIdentify and select all merged cells with Kutools for Excel

Kutools for Excel's Select Merged Cells tool will help you identity, find and selected all merged cells in a selection with only one click.

Kutools for Excel includes more than 120 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.

After you select the range that you want to select merged cells in, just click the Kutools >> Select Tools >> Select Merged Cells, it will select all merged cells in the selection immediately.

shot-identify-merged-cell-2.png

shot-identify-merged-cell-3.png


댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
22
어제
109
최대
1,347
전체
167,539
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.