+ Reply to Thread
Results 1 to 5 of 5

Match values of A column with B column if not match then highlight it through VBA code

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    india
    MS-Off Ver
    excel 2010
    Posts
    425

    Match values of A column with B column if not match then highlight it through VBA code

    Match values of A column with values of B column in the attached file
    you can see cell A1 value perfectly match with cell
    B5 value so i did not highlight that value , cell A2 value also matching with cell B4 value, but you can see
    value of A6 and value of B8 difference of both values is less than two so i highlight that values in yellow
    color also cell A13 and cell B14 values difference is less than two so i also highlight that values in yellow
    color , but cell A10 and cell B9 between that cell values difference is greater than two but less than ten
    so i highlight that values in red color, you can see in cell A13 and cell B14 that is first pair i highlight
    in yellow color and second same pair because it is appear second time in A column and B column so that
    second pair i highlight in green color so remember always highlight second pair in green color, then you
    can see value of A19 no match found in B column so i highlight it in blue color also value of cell B18
    no match found in A column so i highlight it in blue color, so how do that above whole process through
    VBA code, thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Match values of A column with B column if not match then highlight it through VBA code

    Not quite clear how you define the second same pair.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    03-13-2013
    Location
    india
    MS-Off Ver
    excel 2010
    Posts
    425

    Re: Match values of A column with B column if not match then highlight it through VBA code

    your code not working properly see in to attached file please see cell A2 and cell B4 perfectly matching but even so code highlighted that values same thing happen about cell A8 and cell B6 , there is so many these types of mistake happen due to this code so please do amendement in that code

    and do not worry about second pair forget about second same pair just do remaining thing it means forget about green color,

    but i am surprised for that your code working perfectly on small data but not working on big data why this happen i dont know
    Attached Files Attached Files
    Last edited by keshavtale; 02-28-2021 at 03:38 AM.

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Match values of A column with B column if not match then highlight it through VBA code

    try

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-13-2013
    Location
    india
    MS-Off Ver
    excel 2010
    Posts
    425

    Re: Match values of A column with B column if not match then highlight it through VBA code

    thanks now your code slightly working properly but if you can do please do some amendment look in to attached file
    see cell A145 and B143 value of that cells near by same but why code highlighted it by different color it should be in yellow color or if possible do not highlight these types values which difference in only in decimal point for example cell A145 and cell B143 difference of that values is only 0.045 so if possible do not highlight these values which difference is less than one, now your code near by work properly

    also one more thing i want that suppose 26558 this value appear two time in column A and appear one time in B column
    so highlight that extra one value which is in column A because it is appear one time extra in column A so highlight that
    extra value
    Attached Files Attached Files
    Last edited by keshavtale; 02-28-2021 at 09:43 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] search & highlight the case sensitive text in one column that match a list on other column
    By Alexander2020 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-07-2020, 03:17 AM
  2. Highlight Approximate Match in a column (Not exact Match)
    By rahuleyes in forum Excel General
    Replies: 1
    Last Post: 09-07-2019, 08:47 AM
  3. [SOLVED] Count Unique Values with Partial Match one column exact match another column
    By carsto in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-30-2019, 09:56 AM
  4. [SOLVED] Highlight Invoices column B match column A
    By majidsiddique in forum Excel General
    Replies: 9
    Last Post: 01-18-2019, 10:06 AM
  5. [SOLVED] VBA code to compare rows based on 4 column values and highlight is no match
    By Sirilias in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-16-2015, 02:22 PM
  6. [SOLVED] Code to find row containing match in column a and another match in another column
    By anfdrew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2015, 12:53 AM
  7. [SOLVED] VBA code to return all values in column that match a specified value
    By twanbiz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 05:39 AM

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