Good evening. Anyone who has ever had to manually compare two rows of data and pick out the values that don't match knows how much a pain in the butt it is. I'm hoping to automate the process and in doing so reduce the time it takes to compare values as well as decrease error rates in confirming that values match.
I've attached a workbook that contains two columns of data, a workbook that I use to "analyze" my data that I export from the web based portal as a .CSV file and a screen shot of what the data looks like in the web based portal before I export it. The attached workbook has a complete list of department codes and their corresponding earnings codes.
The first column in the workbook contains department codes which are made up of a 3 digit office location "prefix" and a 3 digit task "suffix". For example:
502600 = (502) Waterville Office (600) Travel Time
The second column contains earnings codes that are one or two word descriptors that correspond to the department codes. For example
Travel Time
Documentation
Weekly Staffing
To complicate things just a bit, some department codes are assigned only one earnings code while other department codes are assigned 5 or 6 earnings codes. For example:
503600 = (503) Wilton Office (600) Travel Time
503325 = (503) Wilton Office (325) Documentation
503325 = (503) Wilton Office (325) Non-Billable
503325 = (503) Wilton Office (325) Vacation
Here's what I'm trying to accomplish with VBA code:
1) I need the code to disregard (or delete) the first 3 digits in the earnings codes when comparing the last 3 digits with a corresponding department code.
2) I need the code to confirm that the 3 digit earnings code matches with the department code that was chosen by the employee
3) I need the cells that are mismatched to be highlighted
I'm relatively new to VBA but I'm not looking for someone to write my code for me just to give me some pointers in a direction....I'm curious and determined enough to take bits and pieces that you might be able to offer and pull them together. Thanks for taking a look.
Matthew
Bookmarks