Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Comparision between 2 cells

  Asked By: Kerri    Date: Jan 10    Category: MS Office    Views: 624
  

I am Writing a Macro in which I need to compare the
values between 2 Cells( Finally the whole row) and If
the values don't match I need to color the Cell which
has different value.

Please advice me how should I wrote it in.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Elmer Young     Answered On: Jan 10

Are you comparing cells  in the same row  (e.g.) A1 with B1 or in a different
row?

If A1 and B1 are different which one do you want to colour?

Could you do this better by using conditional formatting rather than a macro?

 
Answer #2    Answered By: Glenda Frazier     Answered On: Jan 10

I am comparing the cells  between different rows.
Lets say A and C. A is default and C needs to be
colored if its different.

 
Answer #3    Answered By: Vilmos Fischer     Answered On: Jan 10

So, Set a conditional format

in, say, C1
Format/Conditional Format
Condition: not equal to A1 (make sure you use A1 not $A$1)
Format: borders and shading, Fill, Red
Then copy this down from C1 however far you want to go. You can use the
format painter to do this if the cells  have already been filled.

 
Didn't find what you were looking for? Find more on Comparision between 2 cells Or get search suggestion and latest updates.




Tagged: