This is a piece of code where I use the fact that it is a merged area or not in a particular way:
If OutputRange.MergeCells = True Then
If REV = 0 Then
If InChkBox.Offset(0, REV) = False Then
...
Else
...
End If
ElseIf REV > 0 Then
If InChkBox.Offset(0, REV) <> InChkBox.Offset(0, (REV - 1)) Then
...
Else
...
End If
End If
Else
Dim TempRange As Range
Set TempRange = Range(Cells(OutputRange.Row, 3), Cells((OutputRange.rows.Count - 1 + OutputRange.Row), 21))
If REV = 0 Then
If InChkBox.Offset(0, REV) = False Then
...
Else
...
End If
ElseIf REV > 0 Then
If InChkBox.Offset(0, REV) <> InChkBox.Offset(0, (REV - 1)) Then
If InChkBox.Offset(0, REV).Value = True Then
...
Else
...
End If
Else
If InChkBox.Offset(0, REV).Value = False Then
...
Else
...
End If
End If
Else
'Do nothing
End If
End If
End Function
Bookmarks