Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Cell changes highlighting

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Cell changes highlighting

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Highlighting perezianda Excel Discussion (Misc queries) 3 October 20th 06 09:26 AM
highlighting cell owl527[_11_] Excel Programming 4 November 28th 05 03:20 PM
Highlighting A Cell Coltsfan Excel Discussion (Misc queries) 1 September 19th 05 10:24 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM
Highlighting a cell Vlad[_7_] Excel Programming 3 May 26th 04 03:51 PM


All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"