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: 1,814
Default Arrays problem in new filtering code

I use Excel '03. There are two sheets with different projects we are working
on. Column E on both sheets have identical information; an alpha-numeric code
formated xxxxx-xxxxx. What I am trying to make happen is when I click on
Sheet 2, it filters column E to those codes that are currently being
displayed on Sheet 1 through the activate event. Sheet 1 has a seperate
column with project owners names on it that I use to filter the sheet by one
name at a time and look at the information for all of the owners projects.
One code per project.

I am trying to get all the codes from Sheet 1 to store into an array but my
loop exits when I get to the last cell in the range. I am trying to use a
dynamic array that uses range(e65536).end(xlup).address as the upper limit of
the array. Here is the code. Thanks for any help.

Dim CCLimit As Integer
Dim CCIndex() As String
Dim MyRange As Object
Dim EndPoint As Variant
Dim Count As Long, i As Long
Dim R As Object

CCLimit = GetLimit()
ReDim CCIndex(1 To CCLimit)

i = 1
Count = 6
EndPoint = Worksheets("Sheet1").Range("E65536").End(xlUp).Add ress
Set MyRange = Worksheets("Sheet1")
MyAddress = MyRange.Range("E" & Count).Address
Do
If Sheets("Sheet1").Rows(Count).Hidden = False Then
CCIndex(i) = Left(MyRange.Range("E" & Count).Value, 11)
MsgBox CCIndex(i)
i = i + 1
End If
Count = Count + 1
MyAddress = MyRange.Range("E" & Count).Address
Loop Until MyAddress = EndPoint

All I need to know at this point is how to get the array to work. I tried to
change Loop Until MyAddress = EndPoint
to
Loop Until MyAddress EndPoint
but that did not work.
 
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
Zip code filtering Zack Excel Discussion (Misc queries) 1 September 25th 08 06:46 PM
How Populating Arrays/Range in VBA code [email protected] Excel Programming 3 November 16th 06 09:19 PM
Arrays problem Ali Baba Excel Programming 3 September 9th 05 03:42 PM
VBA (arrays problem) Ali Baba Excel Programming 6 August 23rd 05 01:44 AM
comparing elements from 2 arrays using VBA code lopsided Excel Programming 3 September 23rd 03 04:34 PM


All times are GMT +1. The time now is 06:38 PM.

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"