Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Comparing rows on one sheet to list on other


Tom,

Thanks for the reply, and the code. However it didn't move a thing
and I know that about 80% of the items should match, and be moved.
Unfortunatly, I'm not versed enough in VBA to really figure out why i
didn't move, so it's hard for me to tell what's up.. I'm gonna try
few things, but if you have any other ideas (or anyone else for tha
matter), please let me know.

Tom Ogilvy Wrote:
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 t

the
Servers sheet. If there is a match, I need to move the active row t

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/



--
steve
-----------------------------------------------------------------------
stevem's Profile: http://www.excelforum.com/member.php...nfo&userid=772
View this thread: http://www.excelforum.com/showthread.php?threadid=26076

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
Comparing List A to List B and add what's missing from List B Gilbert Excel Discussion (Misc queries) 2 July 20th 09 11:18 PM
Comparing List A to List B and add what's missing from List B Gilbert Excel Discussion (Misc queries) 1 July 20th 09 08:41 PM
Search a worksheet, extract rows using a list from another sheet bobf Excel Discussion (Misc queries) 9 August 31st 05 04:56 AM
Comparing rows on one sheet to list on other stevem[_8_] Excel Programming 2 September 17th 04 05:52 PM
Comparing two rows mika.[_2_] Excel Programming 1 December 17th 03 06:27 PM


All times are GMT +1. The time now is 02:23 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"