+ Reply to Thread
Results 1 to 2 of 2

Trying to create a macro to check and highlight using VBA

  1. #1
    Registered User
    Join Date
    06-11-2019
    Location
    United States
    MS-Off Ver
    Office 365?
    Posts
    6

    Trying to create a macro to check and highlight using VBA

    So basically I have two spreadsheets. One is a key with a couple fields and the other is the data table with the same fields but many more rows.
    What i would like to do is compare the a2 cell of the data sheet with the a2 cell of the key sheet.
    if they are = then procede to compare the columns of the key sheet with the data sheet.
    if the column cells are not = then color red, if they are = then leave alone
    if the a2 and a2 cells of the different sheets are not equal then increase the row count of the key sheet until it finds the correct key for the a2 cell on the data sheet.


    one the columns are highlighted, increase row count by 1 and continue through all of the rows on the data sheet.

    Could someone help me code a VBA outline for this?


    I have included a picture of what it should look like!

    Thanks all.
    Attached Images Attached Images

  2. #2
    Forum Moderator Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux
    Posts
    10,334

    Re: Trying to create a macro to check and highlight using VBA

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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