Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a Macro that help paste the lot#
Hi all Gurus,
I have 3 worksheets namely 1) Receiving Unit by Lot# worsheet 2) Shipout unit by Lot# worksheet 3) XXX worksheet All 3 worksheets contain 2 column titles Lot # Total Quantity i want to create a Macro that help paste the lot#, not found in "Receiving unit worsheet" but found in "Shipout unit worksheet" in "XXX worksheet". Thanks Lawrence |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a Macro that help paste the lot#
I made the ID column A. Change as required
Sub FindMissingData() Const ID_Col = "A" Set RcvSht = Sheets("Receiving Unit by Lot#") Set ShipSht = Sheets("Shipout unit by Lot#") Set TmpSht = Sheets("XXX") TmpSht.Cells.ClearContents 'copy header row from Shipped shat to Temp Sht ShipSht.Rows(1).Copy _ Destination:=TmpSht.Rows(1) TmpRow = 2 RowCount = 2 With ShipSht Do While .Range(ID_Col & RowCount) < "" ID = .Range(ID_Col & RowCount) Set c = RcvSht.Columns(ID_Col).Find(what:=ID, _ LookIn:=xlValues, lookat:=xlWhole) If c Is Nothing Then .Rows(c.Row).Copy _ Destination:=TmpSht.Rows(TmpRow) TmpRow = TmpRow + 1 End If RowCount = RowCount + 1 Loop End With End Sub "Lawrence" wrote: Hi all Gurus, I have 3 worksheets namely 1) Receiving Unit by Lot# worsheet 2) Shipout unit by Lot# worksheet 3) XXX worksheet All 3 worksheets contain 2 column titles Lot # Total Quantity i want to create a Macro that help paste the lot#, not found in "Receiving unit worsheet" but found in "Shipout unit worksheet" in "XXX worksheet". Thanks Lawrence |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create WB, create new Sht, paste data. (Macro not working) | Excel Programming | |||
I need formula help or create a macro to copy and paste value only | Excel Discussion (Misc queries) | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
Macro cut and paste quits, can't re-create | Excel Programming | |||
Create an undoable 'paste formula' macro | Excel Programming |