View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Oleks Oleks is offline
external usenet poster
 
Posts: 1
Default optimize cycle's speed - For, Next or DO, UNTIL; IF-THEN, ENDIF or CASE, ENDCASE

Hi,
I have cycle which is checking duplicates names in column 12.

For j = 1 To 65000
dupl = Sheets("Sheet1").Cells(j, 12).Value
If dupl = strText Then
c = c + 1
numbere = numbere + 1
Else
End If
Next j


The cycle become slower when j is growing.
I want to optimize cycles for speed.

Should I change For, Next cycle to DO, UNTIL (or any other)?
Should I change IF-THEN, ELSEIF, ELSE, ENDIF to
CASE, ENDCASE (or any other)?

Is this effecting speed?

Thank you

--
Message posted from http://www.ExcelForum.com