Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Find range of merged cells

I would like a macro that can search one cell say "A1" and check if the cell
is merged.

If the cell is merged then return all cells merged with "A1"

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Find range of merged cells

Something like this:

Public Function MergedCells(WhichRange As Range) As Variant

With WhichRange
If .MergeCells = False Then
MergedCells = False
Else
MergedCells = .MergeArea.Address
End If
End With

End Function

NickHK

"mcphc" wrote in message
...
I would like a macro that can search one cell say "A1" and check if the

cell
is merged.

If the cell is merged then return all cells merged with "A1"

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Find range of merged cells

Cheers Nick just what I was looking for

"NickHK" wrote:

Something like this:

Public Function MergedCells(WhichRange As Range) As Variant

With WhichRange
If .MergeCells = False Then
MergedCells = False
Else
MergedCells = .MergeArea.Address
End If
End With

End Function

NickHK

"mcphc" wrote in message
...
I would like a macro that can search one cell say "A1" and check if the

cell
is merged.

If the cell is merged then return all cells merged with "A1"

Thanks




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 Address of merged range VBA jlclyde Excel Discussion (Misc queries) 2 August 26th 09 03:14 PM
Find Merged Cells Mike Rogers Excel Discussion (Misc queries) 5 December 6th 06 12:24 AM
Is there an easy way to find/display merged cells in excel Ronald J. Excel Worksheet Functions 2 November 1st 06 04:32 PM
how can I find merged cells in a large xl-file tvanellen Excel Discussion (Misc queries) 5 May 8th 06 01:02 AM
find and demerge merged cells jeromek Excel Programming 1 November 27th 04 05:05 PM


All times are GMT +1. The time now is 12:44 AM.

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"