View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default Return intesected range

Sub test()
Dim iRange As Range
Set iRange = Intersect(Range("C:E"), Range("5:10"))
Debug.Print iRange.Address
End Sub

HTH
--
AP

"XP" a écrit dans le message de
...
I am using Office 2003 on Windows XP.

My code dynamically returns certain contiguous columns and certain
continguous rows, say "C:E" and "5:10" for example, in two different
variables as string addresses.

I need to return the address of the intersection of these two ranges:

C5:E10
Is it possible to do this without parsing the range addresses and without
actually changing the user's current selection? If so, could someone

please
post a one or two line solution? I've been trying to use the "Intersect"
method without success.

Thanks much in advance.