ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   complex Cell (https://www.excelbanter.com/excel-programming/276486-complex-cell.html)

Al[_8_]

complex Cell
 
I had a cell, that consist of 2 cells (1 row, 2 columns).
How can I recognize from range object, that I recived,
that the cell is complex?

Al[_8_]

complex Cell
 
Thanks,
but how can I understand with wich cell my cell is merged?

BR, Al

-----Original Message-----
Each range has a property called MergeCells. If you

select a cell from
the range and the property is set to True then you have

a cell which is
merged to others.

regards,

Nils

Al wrote:
*I had a cell, that consist of 2 cells (1 row, 2

columns).
How can I recognize from range object, that I recived,
that the cell is complex? *

.


Dave Peterson[_3_]

complex Cell
 
One way:

Option Explicit
Sub testme02()

Dim myCell As Range
Set myCell = ActiveCell

If myCell.MergeCells = True Then
MsgBox Prompt:="found at: " _
& myCell.Address(0, 0) & " Of " _
& myCell.MergeArea.Address(0, 0)
End If

End Sub




Al wrote:

Thanks,
but how can I understand with wich cell my cell is merged?

BR, Al

-----Original Message-----
Each range has a property called MergeCells. If you

select a cell from
the range and the property is set to True then you have

a cell which is
merged to others.

regards,

Nils

Al wrote:
*I had a cell, that consist of 2 cells (1 row, 2

columns).
How can I recognize from range object, that I recived,
that the cell is complex? *

.


--

Dave Peterson



All times are GMT +1. The time now is 09:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com