LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Application.Intersect

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.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
intersect ranswert Excel Programming 12 February 6th 08 01:15 PM
Intersect Arne Hegefors Excel Programming 1 July 25th 06 09:38 AM
Intersect [email protected] Excel Programming 2 July 19th 06 10:41 PM
Row column intersect thiaga Excel Programming 0 April 4th 06 06:32 PM
Help with If Not Intersect derek Excel Programming 6 July 11th 03 04:39 PM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"