How can i decide whether a range of cells are merged or not?
Upcoming Power Excel Seminars
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: How can i decide whether a range of cells are merged or not?

  1. #1
    Guest

    Default

     
    Pls.... help

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can right click on the suspected area, then choose Format Cells. Go to the Alignment Tab, and if there is a tick in the Merge Cells box then they're merged

  3. #3
    Guest

    Default

    The MergeCells property will tell you whether there are any merged cells in a range.

  4. #4
    Board Regular Barry Katcher's Avatar
    Join Date
    Feb 2002
    Location
    Dog Beach, Florida. Yeaahh!
    Posts
    4,053
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


  5. #5
    Board Regular Barry Katcher's Avatar
    Join Date
    Feb 2002
    Location
    Dog Beach, Florida. Yeaahh!
    Posts
    4,053
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    When you click on any of the suspected cells, if they are merged, the cell outline will include all of them. If you have your grid turned on, the grid will show you which cells are merged.

  6. #6
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The function below will return true or false if any cells are merged within the range you want to check: -

    Public Function IsItMerged(myRange As Range) As Boolean
    Dim c As Range

    For Each c In myRange
    If c.MergeCells Then
    IsItMerged = True
    Exit Function
    End If
    Next c

    IsItMerged = False

    End Function

  7. #7
    Guest

    Default

      
    Thx all, Thx Mudface!!! That's the answer
    Even though i haven't state the question clearly, you can get what i mean!! Great!!

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com