View Single Post
  #1   Report Post  
BillyJ
 
Posts: n/a
Default Find and Copy loop problem

I am trying to create a macro that defines a range, and if it finds a cell
with a "Y" in it copies and moves the cells next to it. Unfortunately, it
doesn't seem to do any finding. I just copies whatever it is next to. I'm
probably not defining the loop correctly. Any help?

Dim RngToSearch As Range
Dim RngToFind As Range
Dim RngCopy As Range

Sheets("Bid Generation").Select
Set RngToSearch = Range("G9:G1003")
Set RngToFind = RngToSearch.Find("Y")

If RngToFind Is Nothing Then
Else
For Each cell In RngToFind
ActiveCell.Offset(0, 1).Range("A1:B1").Copy
Sheets("Bid Log").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Bid Generation").Select
Next
End If