View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default If Statement: How to test if a cell is merged or not?

Dim ma As Range
Set ma = Range("A3").MergeArea
If ma.Address = "$A$3" Then
MsgBox "not merged"
Else
MsgBox "merged"
End If


--
HTH

Bob Phillips

"Dr. M" wrote in message
...
Hi all! I am looking to do something like this:

If mergecells=True
(then do one thing)
Else
(do something else)
Endif

But I cannot figure out how to get VB to work with my logic. Any ideas?

Thank you!