Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2009, 03:04 AM
Authorized User
 
Join Date: Apr 2009
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
Default Populating an array from a filtered data

Dear all

I am finding a problem working with filtered range selection. Actually I want to populate an array with the filtered data. Here is my code that selects the filtered data but being new to array concepts, I want your help to figure out the code that could fill all the data for columns A thru J from the filtered data.

Sub intero()
Dim a, b As Single
Range("j65536").Select
a = 1
b = Range("j65530").End(xlUp).Row
Range("a" & a & ":j" & b).Copy
End Sub

Thanks in advance
 
Old August 4th, 2009, 07:12 PM
Friend of Wrox
 
Join Date: Feb 2007
Posts: 163
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Not exactly sure what you are trying to do... copy to another sheet? Just place in clipboard?

To just place the filtered information in the clipboard, I guess you could do this:
Code:
Range("a1:f" & Range("f65536").End(xlUp).Row).Copy
However I think it'd be just as easy to place the paste in the same command if you're copying to another sheet, like this:
Code:
Range("a1:f" & Range("a1:f" & Range("f65536").End(xlUp).Row).Copy _
    Destination:=Worksheets("Sheet2").Range("A1")
Hope this helps at least point in the right direction.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Export to Excel only the filtered data Suresh62 Access VBA 0 May 23rd, 2008 10:26 AM
Filtered Sharepoint list, not filtered in infopath wmrdude SharePoint Development 0 July 26th, 2006 05:09 AM
populating an array from text box olddog VB.NET 2002/2003 Basics 1 July 27th, 2005 08:30 AM
using data filtered from asp.net page to generate ashutoshpandey31 Crystal Reports 0 March 12th, 2005 09:40 AM
Binding to Filtered Data (or Data subsets) gdbjohnson C# 8 August 27th, 2004 01:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.