+ Reply to Thread
Results 1 to 2 of 2

How to group rows by value and comapre two columns in two sheet and highlight

  1. #1
    Registered User
    Join Date
    07-28-2017
    Location
    NY
    MS-Off Ver
    2010
    Posts
    1

    How to group rows by value and comapre two columns in two sheet and highlight

    hello,
    I am very new to vba. i was working on this project but got stuck and couldnt figure things out. i would really appreciate your help.
    There is one workbook with two sheet sheet1 and sheet2. I am working on sheet1 column b (wr#), c (mc#), e(address) g(comment) and sheet2 column o(wr#) and r(mc#). sheet1 have duplicate wr# and mc# but sheet2 values are unique. I have figure some things out, but stuck with grouping and comparing. you can see the example

    here is the list of things i wanna do.

    1. all duplicate mc# are grouped together all the rows, orange colored.
    2. in group, when column g is empty, column e should be green for whole group. even if one cell in g is have value, the whole group would be normal orange colored.
    3. one or group of mc# is green when common with sheet2 mc#.
    4. one or group of mc# is yellow when it is not common with sheet2 mc#.
    5. one mc# is red in sheet2 when its not in sheet1.
    6. we will consider and select wr# only when mc# is empty,
    7. when mc# is empty group all duplicate wr# and color blue all rows .
    8 in group, when column g is empty, column e should be green for whole group. even if one cell in g is have value, the whole group would be normal blue colored.
    9. one or group of wr# is green in sheet1 when common with sheet2 wr#.
    10. one or group of wr# is yellow in sheet1 when it is not common with sheet2 wr#.
    11. one wr# is red in sheet2 when its not in sheet1.


    sheet1
    B C E G
    WR# MC# Add Comm
    2571755 MC-136244 HIMROD ST-
    2571755 MC-136244 HIMROD ST-
    3517927 MC-209089 VAN DAM ST ok
    3616397 MC-229268 QUEENS PLZ
    3616397 MC-229268 QUEENS PLZ ok
    3951681 218 ST
    3894677 DITMARS ST
    3894677 DITMARS ST


    sheet2
    O R
    WR# MC#
    2571755 MC-136244
    3616397 MC-209089
    3860962 MC-185865
    3894677

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to group rows by value and comapre two columns in two sheet and highlight

    You get better help on your question if you add a small excel file, without confidential information.

    Please also add manualy the expected result in your file.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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. Comapre cells, if match is found copy three rows
    By bkulaga in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-18-2014, 09:02 AM
  2. VBA to highlight every other group of rows
    By mmdecarl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2014, 03:36 PM
  3. [SOLVED] Excel 2007 : Highlight every other group of rows
    By JimDandy in forum Excel General
    Replies: 9
    Last Post: 11-18-2013, 12:39 PM
  4. Highlight a group of row if it has 4 same consecutive item in its columns
    By exlgh91 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2013, 03:48 PM
  5. Comapre numerical values in one colum with other columns
    By newbieroh in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 09-13-2012, 11:01 AM
  6. Highlight group of rows with same value
    By mateoc15 in forum Excel General
    Replies: 2
    Last Post: 03-05-2012, 12:33 PM
  7. Replies: 0
    Last Post: 11-28-2007, 06:46 AM

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