Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub FindMergedAreas()
Dim d, myCell As Range Set d = Nothing For Each myCell In ActiveSheet.UsedRange If myCell.MergeCells Then If d Is Nothing Then Set d = myCell.MergeArea MsgBox "First merged area is " & myCell.MergeArea.Address Else If Intersect(d, myCell.MergeArea) Is Nothing Then MsgBox "Another merged area is " & myCell.MergeArea.Address End If Set d = Union(d, myCell.MergeArea) End If End If Next myCell End Sub Can anyone give me an alternative macro to the one above which would select all merged areas of a sheet (instead of finding). Thxs |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to select multiple areas with keyboard only | Excel Discussion (Misc queries) | |||
Merge Excel data into specific form areas in a Word Doc | Excel Discussion (Misc queries) | |||
How to merge all selected areas into one area | Excel Programming | |||
Select all pivot table areas/ranges on the active sheet problem | Excel Programming | |||
Code to select print out areas | Excel Programming |