View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rawce Rawce is offline
external usenet poster
 
Posts: 30
Default Cell changes highlighting

Prior to submitting, it'll be easier to make a copy of your sheet and
maybe hide it (Format Sheet Hide). If it complains about cells
going over 255 characters, before hiding, select everything on the
original (make sure it's your original!), right click and copy then
select everything on the copied spreadsheet and paste over it.

Then have something like this:

Sub Highlight_Changes()
Dim iStartRow As Integer
Dim iStartCol As Integer
Dim iEndRow As Integer
Dim iEndCol As Integer
Dim sOrigSheet As String
Dim sCheckSheet As String
Dim vOrigCell As Variant
Dim vCheckCell As Variant

' Sets the range of rows you're looking at; this will go from 1 to 5.
iStartRow = 1
iEndRow = 5

' Names the checking sheet (what your checker sees) and the original
data (the hidden one for comparison).
sOrigSheet = "Original"
sCheckSheet = "Checking"

Do While iStartRow <= iEndRow
' Sets the range of cols you're looking at; this will go from A to
C.
iStartCol = 1
iEndCol = 3
Do While iStartCol <= iEndCol
vCheckCell =
ThisWorkbook.Worksheets(sCheckSheet).Cells(iStartR ow, iStartCol)
vOrigCell =
ThisWorkbook.Worksheets(sOrigSheet).Cells(iStartRo w, iStartCol)
If vCheckCell < vOrigCell Then
ThisWorkbook.Worksheets(sCheckSheet).Cells(iStartR ow,
iStartCol).Select ' Change to Orig if you want to highlight that sheet
instead.
With Selection.Interior
.ColorIndex = 3 ' Change number for a different colour.
End With
End If
iStartCol = iStartCol + 1
Loop
iStartRow = iStartRow + 1
Loop

End Sub

Should work, just change the number of rows/columns (e.g. 26 to go from
A to Z) and sheet titles accordingly.

Cheers,

Ross.

MikeCM wrote:
I have a worksheet that I am asking a person to review (and only one
reviewer). I'm not keen on using 'track changes' to identify values in
cells, so I would like a macro to run automatically and (at a glance
and with impact) highlight changes by colouring the cell and choosing a
different font colour. Is there anything simple to do this? Thanks.

Mike