#1   Report Post  
TerryTutor
 
Posts: n/a
Default Merged Cells

Is there some way to find which cells are merged without having to look at
each cell? Sometimes I want to move or delete cells and it says" cannot move
part of merged cell" or something like that, but it does not show me which
cell is merged.

  #2   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Terry,

I am not aware of any inbuilt method for displaying merged cells.

One possibility would be to use a macro like the following which will select
(and therefore temporarily highlight) merged cells. As written, the macro
will select all merged cells in the selected range. If the selection
comprises a single cell, all merged cells will be selected. If no merged
cells are found, a message will put up to confirm this.

Sub ShowMergedCells()
Dim rng As Range
Dim rCell As Range
Dim RngMerged As Range

If Selection.Count 1 Then
Set rng = Selection
Else
Set rng = Selection.Parent.UsedRange
End If

For Each rCell In rng

If rCell.MergeCells Then
If Not RngMerged Is Nothing Then
Set RngMerged = Union(RngMerged, rCell)
Else
Set RngMerged = rCell
End If
End If
Next

If Not RngMerged Is Nothing Then
RngMerged.Select
Else
MsgBox "No merged cells found in selected range!"
End If

End Sub

You could perhaps assign the macro to a toolbar button.

If you are new to macros, visit David McRitchie's introductory notes at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

---
Regards,
Norman



"TerryTutor" wrote in message
...
Is there some way to find which cells are merged without having to look at
each cell? Sometimes I want to move or delete cells and it says" cannot
move
part of merged cell" or something like that, but it does not show me which
cell is merged.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting into merged cells Jacques E. Bouchard Excel Discussion (Misc queries) 1 May 12th 05 03:27 AM
Charting of Merged Cells znb74 Excel Discussion (Misc queries) 0 April 15th 05 02:42 PM
Make Autofit row height work with merged cells Franketh Excel Discussion (Misc queries) 2 April 6th 05 09:13 PM
Merged cells KimberlyC Excel Worksheet Functions 1 April 2nd 05 12:59 AM
Auto fit merged cells Anson Excel Discussion (Misc queries) 1 December 20th 04 10:09 PM


All times are GMT +1. The time now is 09:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"