Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel Merge Cells

Is there anyway to find out if a particular cells is merged? I need to
unmerged cells in a spreadsheet where there could be merged or umerged
cells. How can I find out if a cells is merged?

Guidance welcome.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Excel Merge Cells

Here is a macro that may help,

Sub Found_Merged_Cells()
'will select the merged cell in a worksheet
Dim mc As Range
For Each cell In ActiveSheet.UsedRange.Cells
If cell.MergeCells Then
If mc Is Nothing Then
Set mc = cell
Else
Set mc = Union(mc, cell)
End If
End If
Next
mc.Select
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

wrote in message
oups.com...
Is there anyway to find out if a particular cells is merged? I need to
unmerged cells in a spreadsheet where there could be merged or umerged
cells. How can I find out if a cells is merged?

Guidance welcome.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Excel Merge Cells

If you want to unmerge all the cells that might be merged:

ActiveSheet.Cells.MergeCells = False

It won't hurt if there are no merged cells.

But it will unmerge all of them--is that what you wanted?

" wrote:

Is there anyway to find out if a particular cells is merged? I need to
unmerged cells in a spreadsheet where there could be merged or umerged
cells. How can I find out if a cells is merged?

Guidance welcome.


--

Dave Peterson
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
Microsoft Excel Merge Cells Marketing Excel. Merger of Cells Excel Discussion (Misc queries) 1 March 11th 10 08:24 PM
On excel, can you merge the data from 2 diferent cells Jose Reyes Excel Discussion (Misc queries) 3 August 15th 08 06:34 PM
Why can't I merge cells in Excel? beckybun Excel Discussion (Misc queries) 2 July 24th 06 08:52 PM
Cannot merge or unmerge cells in Excel Tara Excel Discussion (Misc queries) 2 July 5th 06 09:30 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


All times are GMT +1. The time now is 10:23 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"