array

  • Thread starter Thread starter internetisnice
  • Start date Start date
I

internetisnice

i have this code for setting an arayy from a range

Set r = Range(ActiveCell, ActiveCell.SpecialCells(xlLastCell))
t = r.Value

this is fast for not using "for next" or "do while"
but as i need only some parts of the range (for example columns A C F G) how
can i do that?
is it possible?
 
You can either pick up all the cells in that range and ignore them when you
process stuff.

Or you can build your array by looping through the cells in the order that you
want.
 
You can probably use the Union function.

Set CombRng = Application.Unition(Range("A:A"), Range("C:C") _
Range("F:F"), Range("G:G")

Check it out in VBA Help.
 
thanks!






JLGWhiz said:
You can probably use the Union function.

Set CombRng = Application.Unition(Range("A:A"), Range("C:C") _
Range("F:F"), Range("G:G")

Check it out in VBA Help.
 

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