If you don't know the extend of the merge, you could just ask:
Option Explicit
Sub testme()
Dim myMergeArea As Range
Dim myRng As Range
With Worksheets.Add
'some test ranges
Set myMergeArea = .Range("a1:d3")
myMergeArea.Merge
Set myRng = .Range("a1")
MsgBox myRng.Address & vbLf & myRng.MergeArea.Address
'myrng.mergearea will be the merged area range
If myRng.MergeCells Then
MsgBox "it's merged"
Else
MsgBox "it's not merged"
End If
myRng.Formula = "=c99"
End With
End Sub
And I could assign a formula without a problem.
crapit wrote:
If there are 3 columns of merge cell i.e A1 (A1 & A2), B1 (B1 & B2), C1
( C1 & C2 )
can i refer it as range("a1:c1")
As for formula, can it be used ay a merge cell?
--
Dave Peterson