Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if Cells(r, c).MergeArea.Count > 1 Then
'houston, we have a merge area
else
'houston, go back to sleep -- no merge area
end if
Sub CheckMergedCells()
Dim Cell As Object
For Each Cell In Application.ActiveSheet.Cells.SpecialCells(xlCellTypeBlanks)
With Cell
If .MergeCells Then
.UnMerge
.WrapText = True
Rows(.Row).EntireRow.AutoFit
End If
End With
Next
End Sub
Sub CheckMergedCells()
Dim MergeCell1 As String
Dim MergeCell1Value As String
Dim Cell As Object
Dim MergeAddress() As String
Dim I As Integer
ReDim MergeAddress(I) As String
For Each Cell In Application.ActiveSheet.Cells.SpecialCells(xlCellTypeBlanks)
With Cell
If .MergeCells Then
MergeCell1 = _
Left(.MergeArea.Address, InStr(1, .MergeArea.Address, ":") - 1)
MergeCell1Value = _
Range(MergeCell1).Value
If InStr(1, Join(MergeAddress, ","), MergeCell1) = 0 _
And MergeCell1Value <> "" Then
MergeAddress(I) = MergeCell1
I = I + 1
ReDim Preserve MergeAddress(I) As String
End If
End If
End With
Next
MsgBox Join(MergeAddress, ",")
End Sub
if activesheet.Range(Cells(tRow, tCol), Cells(bRow, bCol)).SpecialCells(xlCellTypeBlanks).Count = activesheet.Range(Cells(tRow, tCol), Cells(bRow, bCol)).Cells.Count Then
<do something>
End if