Results 1 to 5 of 5

Macro to compare 2 columns cell contents and add 'Yes' flag for record

Threaded View

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Macro to compare 2 columns cell contents and add 'Yes' flag for record

    Hi All - I have used this forum many times but this is the first time I am posted a question. I am looking for a solution that will help flag records in a spreadsheet that meet criteria. I have a very large spreadsheet of data from an HRIS system. It has over 50,000 rows. I have done a visual check, but hope to find a programatic way to ensure I caught everything. I do not have access to the HRIS system, I have to work with the export.
    We discovered that some teams in the company have different codes assigned to them. We need to flag all records where the collective team name is the same but the team code changes.

    In the example this file is sorted on Column C and a secondary sort on column D. This groups the team names together for visual checking.
    Column C contains the 'TeamName' and Column D contains the 'TeamCode'. I need to flag records where the same name is entered in Column D in above and below cells, but the TeamCode assigned to that name has changed if compared to above or below cells. I need to flag all records that meet this criteria so we can update them correctly in the system.
    If you look at 'Problem Management', it has multiple team codes assigned to it. In this case, I have flagged all records containing 'Problem Management' with 'Yes' in the last column. 'Mailing Services' has same code assigned to it so we do not need to flag this.

    I attached a spreadsheet with sample information. Please let me know if I have left critical information out or if there is a solution using a different tool.

    I have attempted to solve by isolating the columns and selecting remove duplicates. Then attempted a v-lookup. This did not provide the correct outcome. I have also tried creating a pivot table and looking for cases where a TeamName has more than 1 TeamCode. I could not figure out how to get it to filter on that criteria. I think an VBA macro is needed but I am not experienced writing code.

    Thank you!

    Example described above.

    picture-forum.jpg
    forum example.xlsx
    Last edited by swarren6; 02-08-2013 at 07:32 PM.

Thread Information

Users Browsing this Thread

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

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