Hello all.
Trying to find a fast way to search through two list and add any new items to the master list. Each list is on separate sheet.
Master List: Sheet "EMP ID" I have 1000+ employees with ID numbers in column "B"
New ID list: Sheet "NewBadges" has another 1k+ employees that is always growing. ID numbers are in Column "B"
So I want to compare both list and any new badges numbers from New Badges Sheet Copy the row B:E and paste it at the bottom of Master ID list B:E
Right now I have looping VBA macro that goes through NewBadges ID and deletes all matched IDnumbers then copies over any unmatched items but this takes way to long.
Any help on this would be great
here is the code I'm currently using:
Sub PRBadges()
Dim PListCount As Integer
Dim PCtr As Integer
Application.ScreenUpdating = False
PListCount = Sheets("NewBadges").Cells(Rows.Count, "B").End(xlUp).Row
For Each x In Sheets("Emp ID").Range("B2:B" & Sheets("Emp ID").Cells(Rows.Count, "B").End(xlUp).Row)
For PCtr = PListCount To 2 Step -1
If x.Value = Sheets("NewBadges").Cells(PCtr, 2).Value Then
Sheets("NewBadges").Cells(PCtr, 2).EntireRow.Delete
End If
Next PCtr
Next
Application.ScreenUpdating = True
Range("B1000").Select
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlUp).Offset(1, 0)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("Emp ID").Select
Range("B3000").Select
Selection.End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
MsgBox "EmpID List Updated with Badge Numbers"
Sheets("EMP ID").Select
End Sub
Trying to find a fast way to search through two list and add any new items to the master list. Each list is on separate sheet.
Master List: Sheet "EMP ID" I have 1000+ employees with ID numbers in column "B"
New ID list: Sheet "NewBadges" has another 1k+ employees that is always growing. ID numbers are in Column "B"
So I want to compare both list and any new badges numbers from New Badges Sheet Copy the row B:E and paste it at the bottom of Master ID list B:E
Right now I have looping VBA macro that goes through NewBadges ID and deletes all matched IDnumbers then copies over any unmatched items but this takes way to long.
Any help on this would be great
here is the code I'm currently using:
Sub PRBadges()
Dim PListCount As Integer
Dim PCtr As Integer
Application.ScreenUpdating = False
PListCount = Sheets("NewBadges").Cells(Rows.Count, "B").End(xlUp).Row
For Each x In Sheets("Emp ID").Range("B2:B" & Sheets("Emp ID").Cells(Rows.Count, "B").End(xlUp).Row)
For PCtr = PListCount To 2 Step -1
If x.Value = Sheets("NewBadges").Cells(PCtr, 2).Value Then
Sheets("NewBadges").Cells(PCtr, 2).EntireRow.Delete
End If
Next PCtr
Next
Application.ScreenUpdating = True
Range("B1000").Select
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlUp).Offset(1, 0)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("Emp ID").Select
Range("B3000").Select
Selection.End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
MsgBox "EmpID List Updated with Badge Numbers"
Sheets("EMP ID").Select
End Sub