Thread: ARRAY QUERY
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JingleRock JingleRock is offline
Junior Member
 
Posts: 21
Default ARRAY QUERY

I have the following:

Dim vtInput() As Variant
totalrows = ActiveSheet.UsedRange.Rows.Count
vtInput = Range(Cells(1, 1), Cells(totalrows, 2))
Sheets("BB DATA").Select
ActiveSheet.Range(Cells(5, 1), Cells(totalrows, 2)) = vtInput

The above works fine.

Now, if I change the last line to: ActiveSheet.Range(Cells(5, 1),
Cells(totalrows, 1)) = vtInput;
that works fine as well, giving me the first column of my 2-dimension
array.

How can I paste only the second column of my array?

TIA