TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 270
- Office Version
- 365
- Platform
- Windows
Hello,
Slightly misleading title but I couldn't think of a better way to put it.
I have the following code:
The range in question is C4:J25 and this works perfectly.
What I'd like to do is trap the row number of the cell that has been affected by my code.
Is this possible? Or does the above need to be written slightly differently?
Thank you for reading.
Slightly misleading title but I couldn't think of a better way to put it.
I have the following code:
Code:
Private Sub Worksheet_Calculate()
Const x As String = "Rate has changed"
Dim formulaColor As Long
Dim cell As Range
LinkedCells = RGB(Red:=0, Green:=0, Blue:=255)
For Each cell In ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas)
If InStr(1, cell.Formula, "changed") > 0 Then
cell.Font.Color = LinkedCells
End If
Next
End Sub
The range in question is C4:J25 and this works perfectly.
What I'd like to do is trap the row number of the cell that has been affected by my code.
Is this possible? Or does the above need to be written slightly differently?
Thank you for reading.
Last edited: