Hi,
On my sheet columns K:M are merged cells (only horizontally merged)
The same applies to columns N:P
I'm trying to give a variable column offset to cells/ranges in column K with Integer Ccol1
In this example, Ccol1 = 3
So K15 as starting point should result in N15 where I want to set a value.
For debugging I'm checking the addresses determined:
gives me $N$18:$N$28 which is what I expect and works perfectly
However,
gives me $P$15 instead of $N$15.
Setting the value of P15 does not show in the merged cell N15:P15
What am I doing wrong here?
On my sheet columns K:M are merged cells (only horizontally merged)
The same applies to columns N:P
I'm trying to give a variable column offset to cells/ranges in column K with Integer Ccol1
In this example, Ccol1 = 3
So K15 as starting point should result in N15 where I want to set a value.
For debugging I'm checking the addresses determined:
Code:
Debug.Print sht2.Range("K18", "K28").Offset(0, Ccol1).Address
gives me $N$18:$N$28 which is what I expect and works perfectly
However,
Code:
Debug.Print sht2.Range("K15", "K15").Offset(0, Ccol1).Address
gives me $P$15 instead of $N$15.
Setting the value of P15 does not show in the merged cell N15:P15
What am I doing wrong here?