Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

highlight different values for two columns between two sheets

0

Hello

I  have  two  sheets RP ,PROCESS  should  match  from  column B:D   and  match  the  same  values  for  columns  E,F  .if  the  same values  are  existed  in isheet PROCESS   ,then should  ignore higlighting   when match  sheet RP  with  sheet PROCESS . if  there items  contain  different  values  then  should  highlight  the  different  values  for  sheets  RP ,PROCESS into  column E,F then  will  copy the  items  contain  different  values to sheet MASTER . by  the  way  the  code  works  for  sheet  MASTER but  the  problem is  not  higlighted  the  different  values  for  sheets RP ,PROCESS . I  think  the  problem  from  theses.

With p
    .Range("E2").Resize(k, 7).Interior.Color = vbYellow
    .Range("E2").Resize(k, 7).SpecialCells(xlBlanks).Interior.ColorIndex = 0
    End With
    With r
    .Range("E2").Resize(k, 7).Interior.Color = vbYellow
    .Range("E2").Resize(k, 7).SpecialCells(xlBlanks).Interior.ColorIndex = 0
    End With

so  I  put  the  right  result  for  sheets RP ,PROCESS how  should  highlight  the  different  values .

thanks

Answer
Discuss

Discussion

Leap While your counter k will work for your Master sheet, it relates to the keys in your dictionary (and the total number of unique values in sheets r and p). It does NOT relate to the rows in r or p so you can't expect it to shade the cells in those sheets.

Sorry but I don't have time to suggest a solution for you
John_Ru (rep: 6102) Jul 21, '22 at 10:06 am
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login