Avatar of bsharath
bsharath
Flag for India asked on

Find and move rows

I need help with a macro that can check sheet 1 which has content as this


http://i72.photobucket.com/albums/i173/or.jpg
http://i72.photobucket.com/albums/i173/ssor.jpg
http://i72.photobucket.com/albums/i173/rror.jpg

Column A has this

Sheet 2 has many columns of data and many rows

Need to search full content and move the complete row if found as column A of sheet 1 to sheet 3

Whole row should be copied or cut either ways is fine with me
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
bsharath

8/22/2022 - Mon
hanklm

FYI:  The image links don't seem work - at least not for me.

I get redirected here: http://beta.photobucket.com/browse?httpstatus=404

Maybe it's just a temporary issue?
Saqib Husain

It would be better if you upload the files on experts-exchange.

Better still if you can upload an excel file (possibly fictitious) so that direct testing could be done instead of rebuilding the data.
bsharath

ASKER
The links are dummy that i placed

These URl's 100's will be in sheet1 column A

Find each in sheet 2 and copy full row to sheet 3
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
bsharath

ASKER
Any help with this please?
Saqib Husain

Please throw in a sample file to work on.
bsharath

ASKER
Please find attached sample file
Sample.xls
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Saqib Husain

Here you go

Sub getfoundurls()
    Dim cel As Range, fs2 As Range
    For Each cel In Sheet1.UsedRange.Columns(1).Cells
        Set fs2 = Sheet2.UsedRange.Find(cel, , , xlWhole)
        If Not fs2 Is Nothing Then
            fs2.EntireRow.Copy Sheet3.Cells.SpecialCells(xlCellTypeLastCell).Offset(1).EntireRow
        End If
    Next cel
End Sub
bsharath

ASKER
Thanks

Anyway i can color sheet 1 cells whose content is not found in sheet 2 and was skipped
ASKER CERTIFIED SOLUTION
Saqib Husain

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
bsharath

ASKER
Thank you
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy