View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
William[_2_] William[_2_] is offline
external usenet poster
 
Posts: 227
Default Display range values

Hi VJ

This should return the values to cell E1

Sub test()
Dim r As Range
With ActiveSheet
Set r = Range("A25:D26,A43:D47")
Application.Intersect(r, .Range("A:A,C:C")).Copy .Range("E1")
End With
End Sub
--
XL2002
Regards

William



"VJ" wrote in message
...
| I have a range whose address is something like this:
$A$25:$D$26,$A$43:$D$47
|
| I need to extract the values from col A and col C and ignore the values
from the col B and D.
|
| I am really stuck with this problem and can somebody provide me a VBA code
to do that.
|
| Thanks in advance.
|