Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
K.boy
 
Posts: n/a
Default How to find out merge cells from unknown position

Dear Excalers,
I have a question that is in worksheet.
How can I find out merged cells from a sheet?
Best regards,
K.boy


  #2   Report Post  
Max
 
Posts: n/a
Default

Think the easiest way is to get rid of all the merge cells in the sheet. If
this is not a problem (the "total removal of all merge cells" part), then
you could try:

Press CTRL + A to select entire sheet
Click Format Cells Alignment tab
Click to *clear* the "Merge cells" checkbox
(may have to click a few times)
Click OK

And if the above is too drastic an action, think this previous post below by
Dave Peterson in .misc would prove to be of great help:

Dave also provides a Sub testme02() which will inform you on the location of
merged cells in the sheet via message boxes (one at a time) e.g.: 1st msg:
"found at D14 Of D14:E16", Answer Yes*, 2nd msg: "found at B21 Of B21:C23",
and so on, until all merge cells are found
*but make a note somewhere on the details first, before answering Yes

"Manually, you could divide and conquer. Select half the range, hit ctrl-1
(to show the Format|Cell dialog). Look at that Alignment tab and look at
the Merge cells box. If it's not checked, look in the other half. If it's a
black check mark, you found it. If it's a grey check mark, you're getting
warmer--it's in the selected range.

Here's one way via a macro that looks at all the cells
in the usedrange:

Option Explicit
Sub testme02()
Dim myCell As Range
Dim resp As Long

For Each myCell In ActiveSheet.UsedRange
If myCell.MergeCells = True Then
If myCell.Address = myCell.MergeArea.Cells(1, 1).Address Then
resp = MsgBox(Prompt:="found at: " _
& myCell.Address(0, 0) & " Of " _
& myCell.MergeArea.Address(0, 0), _
Title:="Continue Looking?", _
Buttons:=vbYesNo)
If resp = vbNo Then
Exit Sub
End If
End If
End If
Next myCell

End Sub

If you're new to macros, you may want
to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie*/excel/getstarted.htm

Don Edmondson wrote:

Is there any (easy) way of finding a cell or cells that
have been merged?
I am trying to sort a (very large) spreadsheet but can't
because Excel "...requires the merged cells to be the same
size..."
I can always select all and remove the merge - but I am
wondering why there are merged cells - hence the reason
for trying to find them!

-------- end --------

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"K.boy" wrote in message
...
Dear Excalers,
I have a question that is in worksheet.
How can I find out merged cells from a sheet?
Best regards,
K.boy




  #3   Report Post  
Max
 
Posts: n/a
Default

Dave also provides a Sub testme02()
which will inform you on the location of
merged cells in the sheet via message boxes (one at a time) ...


Hi guys,

Just wondering if/how could Dave P's Sub testme02() be modified to output
all findings of the merged cells to a new sheet (in col A, say) instead of
via msg boxes ? Would be easier to refer ..

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #4   Report Post  
Max
 
Posts: n/a
Default

The follow on query to modify Dave's sub has been posted as a fresh post in
..programming ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


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
Find cells without multiple spacebars and format... BeSmart Excel Discussion (Misc queries) 2 January 27th 05 11:52 PM
Find all cells with a number and mulitply Jim Excel Discussion (Misc queries) 3 January 21st 05 02:28 PM
How do I merge cells in Excel, like just 2 cells to make one big . chattacat Excel Discussion (Misc queries) 2 January 19th 05 04:25 PM
To safety merge cells without data destroyed, and smart unmerge! Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:17 AM
How can I merge unlocked cells in a worksheet that has been protec NeedMergeHelp Excel Discussion (Misc queries) 2 December 7th 04 01:20 AM


All times are GMT +1. The time now is 01:14 PM.

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

About Us

"It's about Microsoft Excel"