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: 16
Default Looping thorough records

I have the following code that loops through the records and does fine but I
cannot get it to loop back through all of the records in column A. It looks
at cell A1 and does the loop and stops. What am I doing wrong?

Option Base 1
Public RelOpts() As String
Sub GetRelOpt()
x = 1
NextRow = 0
StrToMatch = Cells(1 + NextRow, 1).Value

ReDim RelOpts(1 To x)


Do While Cells(1 + NextRow, 1).Value < ""
If Cells(1 + NextRow, 1).Value = StrToMatch Then
RelOpts(x) = Cells(1 + NextRow, 2).Value
x = x + 1
ReDim Preserve RelOpts(x) As String
End If
NextRow = NextRow + 1
Loop
y = 1
Do Until RelOpts(y) = ""
CCString = CCString + RelOpts(y) + " ,"
y = y + 1
Loop
Cells(1, 5).Value = Left(CCString, (Len(CCString) - 2))


End Sub


Deb
 
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
Delete records when certain records have duplicate column data JVroom New Users to Excel 1 January 26th 09 06:23 PM
draw 999 x 8 random records from file with 8614 records news.wanadoo.nl Excel Programming 1 March 1st 06 03:04 PM
Delete two records together with looping mikeburg[_81_] Excel Programming 2 February 21st 06 05:16 PM
urgent. looping thru all records and applynig formula to get new results shirley Excel Programming 2 April 29th 04 04:32 AM
Looping Through Records. Diana[_5_] Excel Programming 6 December 2nd 03 05:40 PM


All times are GMT +1. The time now is 05:33 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"