Display range values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

(e-mail address removed)

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top