Thanks, the below code works. -One improvement I need to work on
is to treat each row individually within selection, so it highlights
unique formulas per row rather than per sheet...
Sub Audit_Tool_1()
'Highlights Unique formula's within total selection
Dim rngCell As range, rng As range
Dim strTest As String
Set rng = Application.InputBox(prompt:="Select Range to be
evaluated",
Type:=8)
For Each rngCell In rng
If InStr(1, strTest, rngCell.FormulaR1C1, vbBinaryCompare) = 0
And
_
Len(rngCell.Text) > 0 Then
strTest = strTest & "|" & rngCell.FormulaR1C1
rngCell.Interior.ColorIndex = 27
Else
rngCell.Interior.ColorIndex = xlNone
End If
Next
'Highlight Constants (hardcoded) Cells *Note: does not include
constants that contain = (equals)
' E.g. will pick up entry of "30,000" but not "=30,000"
On Error GoTo NotFound
rng.SpecialCells(xlCellTypeConstants, 21).Select
Selection.Interior.ColorIndex = 40
Selection.Font.ColorIndex = 0
' Exit Sub
NotFound:
MsgBox "Finished"
End Sub
|