View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Compare and highlight differences in 2 worksheets in sameworkbook and list differences in 3rd worksheet

On Aug 13, 6:28*pm, Joshua Houck wrote:
I think I have figured out how to highlight the differences in This
Weeks POR and Last Weeks POR using this code-
Sub comparesheets()
* * For Each cl In Sheets("This Weeks POR").UsedRange
* * * * If cl.Value < Sheets("Last Weeks POR").Cells(cl.Row,
cl.Column) Then
* * * * * * cl.Interior.Color = RGB(0, 0, 255)
* * * * End If
* * Next cl
End Sub
Now I just have to figure out how to take the highlighted data and
format them sheet 3(activity changes)


You didn't mention what you want to copy & your link didn't work. Try
If cl.Value < Sheets("Last Weeks POR").Cells(cl.Row, cl.Column)
Then
cl.Interior.Color = RGB(0, 0, 255)
cl.entirerow.copy sheets("sheet 3").cells(rows.count,
1).end(xlup).offset(1)
end if