Hello Wingie,
I'm becoming quite confused as to what you are trying to do. In your post#4, you say that you only want the individual cells high-lighted if they have different values and this I resolved for you in my post#5.
However, in your last post #6, you are again saying that you want to high-light a row. Which way do you actually prefer?
pls vcoolio, in the code line;
If Sheet2.Cells(i, j).Value <> Sheet1.Cells(i, j).Value Then
Sheet1.Range(Cells(i, 1), Cells(i, 6)).Interior.ColorIndex = 8
the number ^ 6 ^ sets the column boundary to ^ F ^. if I change it, it goes to the corresponding alphabet, it doesn't auto-end in the last column. As in 12=L or 11=K. help me to resolve it.
If your data set extends out to, say, Column K and you want the whole row (A - K) high-lighted, then change this line:-
Sheet1.Range(Cells(i, 1), Cells(i, 6)).Interior.ColorIndex = 8
to
Sheet1.Range(Cells(i, 1), Cells(i, 11)).Interior.ColorIndex = 8
Remember to change it in both lines 18 and 28 in the original code.
Obviously, you can set it to end in whichever column you like and thus it will auto-end in that column.
If you only want to high-light the row from Column A out to the cell with the different value in it, then change this line:-
Sheet1.Range(Cells(i, 1), Cells(i, 6)).Interior.ColorIndex = 8
to
Sheet1.Range(Cells(i, 1), Cells(i, j)).Interior.ColorIndex = 8
Again, change it in both lines 18 and 28.
So, for example, if the cell with the different value, say in sheet 2, is C6, then only A6, B6 & C6 will be high-lighted in both sheets.
Cheerio,
vcoolio.
kind regards,
Wingie
If Sheet2.Cells(i, j).Value <> Sheet1.Cells(i, j).Value Then
Sheet1.Range(Cells(i, 1), Cells(i, 6)).Interior.ColorIndex = 8
the number ^ 6 ^ sets the column boundary to ^ F ^. if I change it, it goes to the corresponding alphabet, it doesn't auto-end in the last column. As in 12=L or 11=K. help me to resolve it.