LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Selecting a Range after Autofilter

Hello,

I'm very very new to Excel VBA programming and I have a question in
regards to selecting Ranges after an Autofilter has been applied.

The user will filter the sheet down to their criteria and then I need
to loop through columns A and B and add the filtered data to an array.

Here the code I have so far:

Dim LastRow
Dim b()

Range("A65536").End(xlUp).Select
LastRow = ActiveCell.Row

b = Range("A2:B2" & LastRow).SpecialCells(xlCellTypeVisible).value

The problem is that it's not selecting all the values. I'm assuming a
thick gray line between row numbers in an autofilter indicates a
separate range. It only pulls the data from the "first" range. How do I
select all the ranges into one? and assign it to b?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
selecting an AutoFilter value in code Paul Ponzelli[_3_] Excel Programming 5 May 11th 06 04:32 PM
Selecting AutoFilter Rows Pedro Excel Programming 4 December 14th 04 01:36 AM
Selecting using autofilter cdb Excel Programming 1 September 9th 04 12:38 PM
Selecting Filtered records only when AutoFilter is on Owen Vickers Excel Programming 4 February 21st 04 02:20 AM
Selecting Range After AutoFilter Randal W. Hozeski Excel Programming 4 December 28th 03 03:12 PM


All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"