PC Review


Reply
Thread Tools Rate Thread

Cell changes highlighting

 
 
MikeCM
Guest
Posts: n/a
 
      24th Oct 2006
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

 
Reply With Quote
 
 
 
 
Rawce
Guest
Posts: n/a
 
      24th Oct 2006
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(iStartRow, iStartCol)
vOrigCell =
ThisWorkbook.Worksheets(sOrigSheet).Cells(iStartRow, iStartCol)
If vCheckCell <> vOrigCell Then
ThisWorkbook.Worksheets(sCheckSheet).Cells(iStartRow,
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


 
Reply With Quote
 
acampbell012@yahoo.com
Guest
Posts: n/a
 
      24th Oct 2006
Change the attributes as needed.

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Font.ColorIndex = 5
Target.Font.Bold = True
Target.Interior.ColorIndex = 8
End Sub


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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell highlighting =?Utf-8?B?YmNzdW5pZmk=?= Microsoft Excel Crashes 2 26th Sep 2007 05:46 AM
Cell Highlighting =?Utf-8?B?cGhtY2tlZXZlcg==?= Microsoft Excel Programming 3 31st Oct 2006 10:42 PM
highlighting cell owl527 Microsoft Excel Programming 4 28th Nov 2005 03:20 PM
Highlighting A Cell Coltsfan Microsoft Excel Misc 1 19th Sep 2005 10:24 PM
Highlighting a cell Vlad Microsoft Excel Programming 3 26th May 2004 03:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 PM.