View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
hideki[_7_] hideki[_7_] is offline
external usenet poster
 
Posts: 1
Default Simple looping question


I'd just saw your message. Do you still need this. I'm learning myself.

Sub CopyOrderForm()

Dim rngCell As Range 'each cell
Dim rngWork As Range 'working range
Dim lngCopyPos As Long 'copy position row

Set rngWork = Range("A1:Z1500")
lngCopyPos = 2
For Each rngCell In rngWork
If Left(rngCell.Value, 10) = "order form" Then
Sheets("Sheet2").Cells(lngCopyPos, "A") = rngCell.Value
lngCopyPos = lngCopyPos + 1
End If
Next

Set rngWork = Nothing

End Su

--
hidek
-----------------------------------------------------------------------
hideki's Profile: http://www.excelforum.com/member.php...fo&userid=1890
View this thread: http://www.excelforum.com/showthread.php?threadid=39611