lonesome_road_toad
New Member
- Joined
- Oct 26, 2021
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Hi all,
I have 2 columns of data that I want to ensure contain the same values every time I run the macro. The IDs in the columns come from 2 different data files that the user selects and I want to create a check so people don't accidentally mix and match the wrong files without realizing. The order of the IDs in the 2 columns is different but both columns should contain the same IDs, and if not, I want to build a routine that would call my Clear_Contents macro, display an error message box and then exit sub. I have tried calling vlookup in a For Each loop through Application.WorkbookFunction but it keeps throwing an error every time I run it. Am I missing an easy solution here? Thanks!
I have 2 columns of data that I want to ensure contain the same values every time I run the macro. The IDs in the columns come from 2 different data files that the user selects and I want to create a check so people don't accidentally mix and match the wrong files without realizing. The order of the IDs in the 2 columns is different but both columns should contain the same IDs, and if not, I want to build a routine that would call my Clear_Contents macro, display an error message box and then exit sub. I have tried calling vlookup in a For Each loop through Application.WorkbookFunction but it keeps throwing an error every time I run it. Am I missing an easy solution here? Thanks!