Compare and separate data
Closed
J_Marley
Posts
2
Registration date
Wednesday July 19, 2017
Status
Member
Last seen
July 20, 2017
-
Jul 19, 2017 at 01:23 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 25, 2017 at 11:06 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 25, 2017 at 11:06 AM
Related:
- Compare and separate data
- Beyond compare - Download - File management
- Tmobile data check - Guide
- Gta 5 data download for pc - Download - Action and adventure
- Digital data transmission - Guide
- Transfer data from one excel worksheet to another automatically - Guide
2 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jul 20, 2017 at 11:26 AM
Jul 20, 2017 at 11:26 AM
Hi J_Marley,
Are the values in column A unique? Meaning, can there only be one match?
Best regards,
Trowa
Are the values in column A unique? Meaning, can there only be one match?
Best regards,
Trowa
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jul 25, 2017 at 11:06 AM
Jul 25, 2017 at 11:06 AM
Hi J_Marley,
You want to compare Current with Old requests and move all new and existing data to Shopping sheet. Doesn't this mean that everything needs to be moved to Shopping sheet?
Compare Old with Current and move all rows without a match in column A to Not_Needed sheet. For that I wrote this code:
The correct place to put this code is in a module (instead of ThisWorkbook). Go to the top menu > insert > module of the VBA window.
Best regards,
Trowa
You want to compare Current with Old requests and move all new and existing data to Shopping sheet. Doesn't this mean that everything needs to be moved to Shopping sheet?
Compare Old with Current and move all rows without a match in column A to Not_Needed sheet. For that I wrote this code:
Sub RunMe() Dim lRow, x As Long Dim mFind As Range Sheets("Old_Requests").Select lRow = Range("A1").End(xlDown).Row For Each cell In Range("A2:A" & lRow) Set mFind = Sheets("Current_Requests").Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).Find(cell.Value) If mFind Is Nothing Then cell.EntireRow.Copy Sheets("Not_Needed").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End If Next End Sub
The correct place to put this code is in a module (instead of ThisWorkbook). Go to the top menu > insert > module of the VBA window.
Best regards,
Trowa
Jul 20, 2017 at 01:50 PM
Here is an example excel doc to show what I am trying to accomplish and how I envision it being set up.
https://www.dropbox.com/s/bmp7qf25f1zbibr/List%20Compare%20and%20separate%20example.xlsm?dl=0
Ultimately, other reports will look for the information in the first sheet for "live" information, while still utilizing the last sheet for running reports that require legacy information.