Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup and copy paste Raj[_2_] Excel Programming 0 July 29th 08 05:30 PM
copy a worksheet to new one with repeat rows 5 times mfn Excel Discussion (Misc queries) 0 February 13th 08 11:33 AM
Select cells copy/paste and repeat x times Mike Hann Excel Programming 5 August 5th 06 01:55 PM
Repeat Cell Formula w/out copy/paste? DTTODGG Excel Discussion (Misc queries) 1 March 13th 06 05:11 PM
lookup,copy, paste macro?? Hugh Askew Excel Programming 3 May 1st 04 01:21 PM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"