Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to repeat a lookup; copy & paste from 1 worksheet to another.
Could anyone assist on enabling the following code to: find multiple "text"
within a column (A:A) in sheet 1 (i.e. find all the letters "n" within column A:A within sheet 1) copy entire rows of each "n" find into sheet 2. Essentially repeating this command until all "n" are found and their corresponding EntireRow are copied from sheet 1 into sheet 2. I've had some success with the following, but, can not get it to deliver the desired end result. Again, any help would be greatly appreciated! FYI: I've set this up to run via a command button Sub Rectangle1_Click() Worksheets("Sheet1").Select With Worksheets("Sheet1").Range("a1:a20") Set c = .Find("NJ1S", LookIn:=xlValues) If Not c Is Nothing Then firstAddress = c.Address Do c.EntireRow.Copy Set c = .FindNext(c) Worksheets("Sheet2").Select Worksheets("Sheet2").Range("a8:a20").Find("").Sele ct Worksheets("Sheet2pplier Export").Paste Loop While Not c Is Nothing And c.Address < firstAddress End If End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to repeat a lookup; copy & paste from 1 worksheet to another.
Where line fails?
What results does it deliver? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lookup and copy paste | Excel Programming | |||
copy a worksheet to new one with repeat rows 5 times | Excel Discussion (Misc queries) | |||
Select cells copy/paste and repeat x times | Excel Programming | |||
Repeat Cell Formula w/out copy/paste? | Excel Discussion (Misc queries) | |||
lookup,copy, paste macro?? | Excel Programming |