ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Comparing rows on one sheet to list on other (https://www.excelbanter.com/excel-programming/310214-comparing-rows-one-sheet-list-other.html)

stevem[_8_]

Comparing rows on one sheet to list on other
 
Ok, I asked this already, however since I didn't get an answer tha
worked, I'm going to try to clarify as best as possible.

I have 3 sheets, one called Elements, one called Servers, and on
called Exempt.

Elements has 10K+ rows, with 12 columns. Servers has 2500 rows,
column, and Exempt is empty.

What I need to do, is for each row in Elements, compare column H to th
Servers sheet. If there is a match, I need to move the active row to th
Exempt sheet.

Hopefully this clarifies enough. Having alot of problem with thi
myself as I'm in brain meltdown right now.

Thanks in advance

--
Message posted from http://www.ExcelForum.com


stevem[_10_]

Comparing rows on one sheet to list on other
 
Does anyone have any idea on this one? Still stuck on this.

stevem wrote:
*Ok, I asked this already, however since I didn't get an answer tha
worked, I'm going to try to clarify as best as possible.

I have 3 sheets, one called Elements, one called Servers, and on
called Exempt.

Elements has 10K+ rows, with 12 columns. Servers has 2500 rows,
column, and Exempt is empty.

What I need to do, is for each row in Elements, compare column H t
the Servers sheet. If there is a match, I need to move the active ro
to the Exempt sheet.

Hopefully this clarifies enough. Having alot of problem with thi
myself as I'm in brain meltdown right now.

Thanks in advance.


--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Comparing rows on one sheet to list on other
 
are all the worksheets in the same workbook. In

Sub MoveExempt()
Dim rng as Range, rng1 as Range
Dim rw as Long
with worksheets("Elements")
set rng = .Range(.Cells(1,"H" _
),.Cells(rows.count,"H").End(xlup)
End With
With Worksheets("Servers")
set rng1 = .Range(.Cells(1,"A" _
),.Cells(rows.count,"A").End(xlup))
End With
rw = 1
for each cell in rng
res = Application.Match(cell,rng1,0)
if not iserror(res) then
cell.EntireRow.Copy Destination:= _
Worksheets("Exempt").Cells(rw,1)
rw = rw + 1
cell.EntireRow.clearcontents
end if
Next
on Error Resume Next
rng.SpecialCells(xlBlanks).Entirerow.Delete
On Error goto 0
End Sub

test this on a copy of your workbook.

--
Regards,
Tom Ogilvy



"stevem " wrote in message
...
Ok, I asked this already, however since I didn't get an answer that
worked, I'm going to try to clarify as best as possible.

I have 3 sheets, one called Elements, one called Servers, and one
called Exempt.

Elements has 10K+ rows, with 12 columns. Servers has 2500 rows, 1
column, and Exempt is empty.

What I need to do, is for each row in Elements, compare column H to the
Servers sheet. If there is a match, I need to move the active row to the
Exempt sheet.

Hopefully this clarifies enough. Having alot of problem with this
myself as I'm in brain meltdown right now.

Thanks in advance.


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com