Hi there,
Take a look at the attached workbook and see if it does what you need. It uses the following code inserted in the VBA CodeModule of the worksheet whose values you want to monitor:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Const sPREVIOUS_VALUE_CELL As String = "C1"
Const sPOINTER_CELL As String = "B1"
Const sVALUE_CELL As String = "A1"
Const iARROW_DOWN As Integer = 234
Const iARROW_UP As Integer = 233
Dim rPreviousValueCell As Range
Dim sTargetAddress As String
Dim rPointerCell As Range
If Target.Cells.CountLarge = 1 Then
sTargetAddress = Target.Address(RowAbsolute:=False, ColumnAbsolute:=False)
Set rPreviousValueCell = Me.Range(sPREVIOUS_VALUE_CELL)
Set rPointerCell = Me.Range(sPOINTER_CELL)
If sTargetAddress = sVALUE_CELL Then
On Error GoTo ErrorEncountered
Application.EnableEvents = False
If Target.Value > rPreviousValueCell Then
rPointerCell.Value = Chr(iARROW_UP)
ElseIf Target.Value < rPreviousValueCell Then
rPointerCell.Value = Chr(iARROW_DOWN)
Else: rPointerCell.ClearContents
End If
rPreviousValueCell.Value = Target.Value
On Error GoTo 0
End If
End If
ExitPoint:
Application.EnableEvents = True
Exit Sub
ErrorEncountered:
Resume ExitPoint
End Sub
Note: The font of Cell B1 (Pointer Cell) is set as "Wingdings"
The highlighted values may be altered to suit your requirements.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks