Thread: loop question
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jezebel[_3_] Jezebel[_3_] is offline
external usenet poster
 
Posts: 45
Default loop question

With Worksheet
for i = 2 to 1000
if .Cells(i,4) = "Changed" then
.Cells(i,1) = .Cells(i,2)
else
exit for
end if
Next
End with



"choice" wrote in message
...
i have range d2:d1000
if d = "Changed" then
take the value in B of the same row and put in A of the same row.
if d does not = "Changed" then
exit sub

any help on how to write this as a loop would be greatly appreciated

thanks in advance