Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find and copy | Excel Worksheet Functions | |||
Can Excel Find and Copy a row of data? | Excel Worksheet Functions | |||
Excel find text and copy rows | Excel Discussion (Misc queries) | |||
Find text in cell, copy row to new sheet | Excel Discussion (Misc queries) | |||
Copy Rows found using Find All feature | Excel Discussion (Misc queries) |