Accessing The Value Of A Merged Cell
this wouldn't work? or adapt jim's code to it.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
Dim myRng
If Target.Column = 3 Then
myRng = Range(Split(Target.Offset(, -2).MergeArea.Address,
":")(0)).Value
MsgBox "Date = " & myRng
End If
End Sub
--
Gary
"Minitman" wrote in message
...
Hey Gary,
Thanks for the reply.
I'm not sure if your code is usable in this instance. I'm not sure how
to hard code the cell address of the merged cell, when it can be 1 of
31 different cells.
Thanks for the effort, it is appreciated.
-Minitman
On Tue, 16 Sep 2008 20:35:28 -0400, "Gary Keramidas"
<GKeramidasATmsn.com wrote:
if you type this in the immediate window, it should return the merged range:
?range("C5").Offset(,-2).mergearea.Address
then you could use the split function to get the value
try this:
Sub test()
Dim dval As Date
dval = Range(Split(Range("C5").Offset(, -2).MergeArea.Address, ":")(0)).Value
MsgBox dval
End Sub
|