Hello Dave thanks a lot for this advice. I will try it as soon as possible. I don't know why I haven't seen this property "MergeCells" so far.
Regards ajxecc On Apr 15, 6:40 am, Dave Bonallack <davebonall...@hotmail.com> wrote: > Hi ajxecc, > > Try this code: > > Sub mergedetect() > Dim c As Range > For Each c In Range("A1:A10") > If c.MergeCells = True Then MsgBox c.Address & " is merged with another cell." > Next c > End Sub > > Change the Range ref to suit your needs. > > You can change the code after the "Then" keyword, to do anything you want. > > Regards - Dave. > > > > > Date: Tue, 14 Apr 2009 13:40:57 -0700 > > Subject: $$Excel-Macros$$ Check if selected area contains some merged cells. > > From: ajx...@gmail.com > > To: excel-macros@googlegroups.com > > > Hello > > > I'm trying to write a small excel vba script that returns "TRUE" if in > > a selected area of cells there are any merged cells. > > > Sounds simple, but I haven't found the solutions yet... :-( > > > Is there a poperty that I can check for "merged cells"??? Or any other > > trick that helps???? > > > Any hint is greatly appreciated.. ;-) > > > thanks in advance. > > > ajxecc > > _________________________________________________________________ > View photos of singles in your area Click > Herehttp://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Eco... --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---