AutoMation42
New Member
- Joined
- Oct 14, 2021
- Messages
- 16
- Office Version
- 365
- 2019
- Platform
- Windows
Hi again everyone,
I am sure what I seek to achieve is possible in VBA but it is far beyond my rudimentary skills. There are a couple things I want to do so any help that could be provided will be greatly appreciated. I am going to break the questions up and do one at a time. The first thing I would like to do in a nut shell is compare one sheet to another and remove duplicates from the first sheet. One sheet has constantly changing and updating information we will call this "Sheet 2" and sometimes causes there to be multiple ID's on another sheet which we will call "Sheet 1". I want to compare the ID numbers on "Sheet 1" to the ID numbers on "Sheet 2" and if there is any overlap I want the duplicate to be removed from "Sheet 1". The complications are that "Sheet 1" is broken up into sections so there are different titles for each section and as a result multiple header rows. I have included a picture of a section of what "Sheet 1" looks like (there are many more sections than just the two shown all with a different title but the same headers in the same order). Complication 2 is "Sheet 2" is the same idea but it has 1 single title in cell "A1" and a single header row in "row 2". Complication 3 is that "Sheet 2" has many more columns of data so even though it is 1 header row there are many more header names which means the ID column locations wont always match up. The last complication is that this code has to be dynamic because the headers while they will keep the same names, could have their order moved around on both sheets. The last piece is that I provided fake information to keep everything confidential. The columns that I need to compare by as shown in the image are Columns "A" and "B" so header names "Variable1" and "Variable2" and I may have to add additional columns to sort by if my boss wishes so. If any more information needs to be provided please let me know and I will do my best to provide it. Thank you in advance for any help provided!
I am sure what I seek to achieve is possible in VBA but it is far beyond my rudimentary skills. There are a couple things I want to do so any help that could be provided will be greatly appreciated. I am going to break the questions up and do one at a time. The first thing I would like to do in a nut shell is compare one sheet to another and remove duplicates from the first sheet. One sheet has constantly changing and updating information we will call this "Sheet 2" and sometimes causes there to be multiple ID's on another sheet which we will call "Sheet 1". I want to compare the ID numbers on "Sheet 1" to the ID numbers on "Sheet 2" and if there is any overlap I want the duplicate to be removed from "Sheet 1". The complications are that "Sheet 1" is broken up into sections so there are different titles for each section and as a result multiple header rows. I have included a picture of a section of what "Sheet 1" looks like (there are many more sections than just the two shown all with a different title but the same headers in the same order). Complication 2 is "Sheet 2" is the same idea but it has 1 single title in cell "A1" and a single header row in "row 2". Complication 3 is that "Sheet 2" has many more columns of data so even though it is 1 header row there are many more header names which means the ID column locations wont always match up. The last complication is that this code has to be dynamic because the headers while they will keep the same names, could have their order moved around on both sheets. The last piece is that I provided fake information to keep everything confidential. The columns that I need to compare by as shown in the image are Columns "A" and "B" so header names "Variable1" and "Variable2" and I may have to add additional columns to sort by if my boss wishes so. If any more information needs to be provided please let me know and I will do my best to provide it. Thank you in advance for any help provided!