+ Reply to Thread
Results 1 to 2 of 2

selection of 2 mergedareas next to each other

Hybrid View

  1. #1
    Registered User
    Join Date
    04-13-2004
    Posts
    19

    selection of 2 mergedareas next to each other

    How can I check in VBA if the userselection contains two different mergedareas next to each other?
    thanks
    roland

  2. #2
    Registered User
    Join Date
    01-26-2005
    Posts
    1
    Not sure if this is what you are asking but here is some code that will allow you to detect if the current cell is made up of two or more horizontally merged cells:

    Public Sub CheckMerged()
    CurrentCell = ActiveCell.Column
    NeighborCell = ActiveCell.Offset(0, 1).Column
    If NeighborCell - CurrentCell > 1 Then
    MsgBox "Current cell consists of merged cells across the row"
    End If
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1