Results 1 to 12 of 12

Comparing values in two columns and highlighting cells that don't match

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-22-2014
    Location
    Winthrop, ME
    MS-Off Ver
    Excel 2010
    Posts
    420

    Comparing values in two columns and highlighting cells that don't match

    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
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by moosetales; 05-07-2014 at 11:14 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Comparing two columns and highlighting values
    By Zaid in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-15-2013, 03:12 AM
  2. Comparing columns and highlighting differences
    By Sejrup in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-01-2010, 09:24 AM
  3. Replies: 2
    Last Post: 08-12-2010, 05:54 AM
  4. Comparing 2 columns, highlighting the higher number
    By Hagi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2009, 01:17 PM
  5. Comparing values and Highlighting
    By Alfarata in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-11-2008, 10:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1