Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is my data stored in a column.
Team 1 Team 2 Team 3 Team 4 QC I read in the data using Do Until iempty = 5 ' get names of teams If IsEmpty(Worksheets("teams").Range("A" & irow)) Then iempty = iempty + 1 irow = irow + 1 Else Teamnames(iteam) = Worksheets("teams").Range("A" & irow) irow = irow + 1 iteam = iteam + 1 iempty = 1 If icount = 100 Then Exit Sub End If End If Loop The data reads in correctly and I am able to write it to another column. I have tried to terminate the below do until loop using Null, "", vbNull, 0 or using an IsEmpty(teamnames(iteam)) Do Until Teamnames(iteam) = "" nothing works. without the exit sub command, I get into an infinite loop. can anyone please help? Do Until Teamnames(iteam) = vbNull icount = icount + 1 iteam = iteam + 1 MsgBox "teamnames(iteam)= " & Teamnames(iteam) & " iteam = " & iteam If iteam = 10 Then Exit Sub End If Loop |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help! PRobelms with TODAY()?! | Excel Worksheet Functions | |||
Loop all sheetsand delete empty rows | Excel Programming | |||
Need VBA code to terminate a find loop | Excel Programming | |||
Empty cells in For Loop | Excel Programming | |||
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc | Excel Programming |