Display range values

V

VJ

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.
 
W

William

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

[email protected]

| 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.
|
 
Top