Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mon, 21 Jul 2008 16:28:12 -0300, "Bernard Liengme"
wrote: You did not tell us but I suspect you are using Excel 2007 The code works in XL2003 but not in XL2007 Why? because RG1 and RG2 are valid cell references in XL2007 Rename your ranges as myrg1 and myrg2; fix the code to reflect this and all will be well XL2003 And no, I wasn't able to name the ranges. It appeared I had, which is why I thought I had, but when I opened the names drop down they weren't there. I did figure out how to make it work though. I was looking for the 'apparent' intersection of two cells, assuming there's an apparent intersection of any two cells, and found it. It works like this. Set isect = Application.Intersect(Range("A11").EntireRow,_ Range("D4").EntireColumn) If isect Is Nothing Then MsgBox "Ranges do not intersect" Else MsgBox isect End If End Sub Thanks for your input. It was my misunderstanding of how it worked. Note that it didn't work with single named cells without the ..EntireRow and .EntireColumn, but did work with named blocks of cells which did in fact intersect. Thanks for the input. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
intersect | Excel Programming | |||
Intersect | Excel Programming | |||
Intersect | Excel Programming | |||
Row column intersect | Excel Programming | |||
Help with If Not Intersect | Excel Programming |