LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Extracting data from one sheet unless it is also on a second w

Joel - thanks very much. Works like a charm!
Victoria

"joel" wrote:


Sub CopyUnique()

Set Sht1 = Sheets("Sheet1")
Set Sht2 = Sheets("Sheet2")
Set Sht3 = Sheets("Sheet3")

'set New row to the row hwre to copy on sheet 3
NewRow = 2

With Sht1
RowCount = 2
Do While .Range("A" & RowCount) < ""
EmpID = .Range("A" & RowCount)

With Sht2
Set c = .Columns("A").Find(what:=EmpID, _
LookIn:=xlValues, lookat:=xlWhole)
End With

If c Is Nothing Then
.Rows(RowCount).Copy _
Destination:=Sht3.Rows(NewRow)
NewRow = NewRow + 1

End If

RowCount = RowCount + 1
Loop
End With
End Sub


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157530

Microsoft Office Help

.

 
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
Extracting Specific Data from one sheet to another. Pulling Data from one sheet to another. Excel Worksheet Functions 1 July 14th 08 10:42 PM
Extracting data from one sheet into another T Excel Worksheet Functions 2 February 8th 08 06:24 PM
data validation works in one sheet but not another Patrick Riley New Users to Excel 1 April 18th 07 01:30 AM
Please help. Extracting data from one sheet to another leeannemat New Users to Excel 2 February 11th 06 02:55 PM
help extracting data from an excel sheet Tina Jones Excel Worksheet Functions 4 April 25th 05 01:18 AM


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

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

About Us

"It's about Microsoft Excel"