View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kieranz[_2_] Kieranz[_2_] is offline
external usenet poster
 
Posts: 55
Default Efficient looping

Hi
I have a single column with lots of rows (over 1000s) containing
single digit number eg 0, 1, 2, 3 etc. What i need is an efficient
code to replace selection and then offset. eg

Range("C3").select
do while selection <""
if activecell.value = 1 then
'do x
endif
activecell.offset(1,0).select
loop

The above code can take a long time to print.
Any help appreciated. Thks
Kz