evenyougreg
New Member
- Joined
- Oct 1, 2020
- Messages
- 26
- Office Version
- 365
- Platform
- Windows
Hi!
I've had great success in the past here with VBA macros so I thought I would try my luck again. I pasted some mini sheets as an example, hopefully I did it correctly...
I need to converge 2 spreadsheet given the following scenario:
Spreadsheet 1 entitled "total_siteA.xlsx" with a sheet called "listA" has a long list of network devices,
row 1 are the headers "hostname,operating system,location" and the list starts on line 2. And it goes on and on for about 4000 rows.
Spreadsheet 2 entitled "total_siteB.xlsx" with a sheet called "listB" has the same sort of setup,
same row 1 headers "hostname,operating system,location" and the list starts on line 2 for about 2000 rows roughly.
If there is a hostname match when comparing siteB to siteA, then do nothing and move on,
If siteB has a hostname that is not present on siteA, then copy over/insert the values as a new row and move on.
Simply put, siteB has stuff that siteA has, and I don't care about those, but if B has something new then copy/insert it over to A along with the values.
Hopefully that makes sense, and thanks in advance!!
I've had great success in the past here with VBA macros so I thought I would try my luck again. I pasted some mini sheets as an example, hopefully I did it correctly...
I need to converge 2 spreadsheet given the following scenario:
Spreadsheet 1 entitled "total_siteA.xlsx" with a sheet called "listA" has a long list of network devices,
row 1 are the headers "hostname,operating system,location" and the list starts on line 2. And it goes on and on for about 4000 rows.
Spreadsheet 2 entitled "total_siteB.xlsx" with a sheet called "listB" has the same sort of setup,
same row 1 headers "hostname,operating system,location" and the list starts on line 2 for about 2000 rows roughly.
If there is a hostname match when comparing siteB to siteA, then do nothing and move on,
If siteB has a hostname that is not present on siteA, then copy over/insert the values as a new row and move on.
Simply put, siteB has stuff that siteA has, and I don't care about those, but if B has something new then copy/insert it over to A along with the values.
Hopefully that makes sense, and thanks in advance!!
total_siteA.xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | hostname | operating system | location | ||
2 | l-ubu1 | Ubuntu Linux (64-bit) | vcenter1 | ||
3 | m-win1 | Microsoft Windows Server 2016 (64-bit) | vcenter2 | ||
4 | l-ubu2 | Ubuntu Linux (64-bit) | vcenter1 | ||
5 | l-rhel1 | RedHat (64-bit) | vcenter1 | ||
6 | l-ubu3 | Ubuntu Linux (64-bit) | vcenter1 | ||
7 | m-win2 | Microsoft Windows Server 2016 (64-bit) | vcenter2 | ||
8 | l-ubu4 | Ubuntu Linux (64-bit) | vcenter2 | ||
9 | m-win3 | Microsoft Windows Server 2016 (64-bit) | vcenter2 | ||
10 | m-win4 | Microsoft Windows Server 2012 (64-bit) | vcenter2 | ||
11 | l-rhel2 | RedHat (64-bit) | vcenter2 | ||
12 | l-rhel3 | RedHat (64-bit) | vcenter2 | ||
13 | m-win5 | Microsoft Windows Server 2016 (64-bit) | vcenter2 | ||
14 | m-win6 | Microsoft Windows Server 2016 (64-bit) | vcenter2 | ||
15 | l-ubu5 | Ubuntu Linux (64-bit) | vcenter1 | ||
16 | m-win7 | Microsoft Windows Server 2016 (64-bit) | vcenter1 | ||
17 | l-rhel4 | RedHat (64-bit) | vcenter1 | ||
18 | m-win8 | Microsoft Windows Server 2016 (64-bit) | vcenter1 | ||
19 | l-ubu6 | Ubuntu Linux (64-bit) | vcenter1 | ||
20 | l-ubu7 | Ubuntu Linux (64-bit) | vcenter1 | ||
21 | m-win9 | Microsoft Windows Server 2019 (64-bit) | vcenter1 | ||
22 | m-win10 | Microsoft Windows Server 2019 (64-bit) | vcenter2 | ||
23 | l-ubu8 | Ubuntu Linux (64-bit) | vcenter2 | ||
24 | m-win11 | Microsoft Windows Server 2016 (64-bit) | vcenter2 | ||
25 | l-ubu9 | Ubuntu Linux (64-bit) | vcenter2 | ||
26 | m-win12 | Microsoft Windows Server 2012 (64-bit) | vcenter1 | ||
27 | l-rhel5 | RedHat (64-bit) | vcenter1 | ||
28 | l-ubu10 | Ubuntu Linux (64-bit) | vcenter2 | ||
listA |
total_siteB.xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | hostname | operating system | location | ||
2 | l-suse1 | Suse 12 (64-bit) | nutanix | ||
3 | l-suse2 | Suse 12 (64-bit) | nutanix | ||
4 | l-suse3 | Suse 12 (64-bit) | nutanix | ||
5 | l-rhel2 | RedHat (64-bit) | nutanix | ||
6 | l-ubu9 | Ubuntu Linux (64-bit) | nutanix | ||
7 | l-suse4 | Suse 12 (64-bit) | nutanix | ||
8 | l-suse5 | Suse 12 (64-bit) | nutanix | ||
9 | l-suse6 | Suse 12 (64-bit) | nutanix | ||
10 | l-ubu10 | Ubuntu Linux (64-bit) | nutanix | ||
11 | m-win5 | Microsoft Windows Server 2016 (64-bit) | nutanix | ||
listB |