I am working with a spreadsheet where I'm updating values, and want the font set to bold when/if the value in a cell changes. I may have used the code shown below from Crystal a few months back, but forgot how to apply it. Any ideas how to use this code ? It's not working for me, and I can't find what I'm doing wrong - I searched UA for samples of the Worsheet_Change event coding, but found nothing.
Sub BoldWhenDifferent()
Dim mCol As Long _
, mRow As Long _
, mValue
mCol = ActiveCell.Column
'first value is bolded
ActiveCell.Font.Bold = True
mValue = ActiveCell
'assumes you are in the first row of data
For mRow = ActiveCell.Row To ActiveSheet.UsedRange.Rows.Count
If Not IsError(Cells(mRow, mCol)) Then
If Cells(mRow, mCol) <> mValue Then Cells(mRow, mCol).Font.Bold = True
mValue = Cells(mRow, mCol)
End If
Next mRow
End Sub