Code:
Sub TooCool(InCell As Range, PushTo As Range)
PushTo.Value = "The square of " & InCell.Value & " (in " & _
InCell.Address(0, 0) & ") is " & InCell.Value ^ 2 & "."
PushTo.Interior.Color = vbYellow
PushTo.Font.Color = vbRed
End Sub
Function DoCool(Rng As Range) As String
If Rng.Value < 0 Then
DoCool = "Number in " & Rng.Address(0, 0) & " is less than zero."
Else
DoCool = "Number in " & Rng.Address(0, 0) & " is greater than, or equal to, zero."
End If
Evaluate "HYPERLINK(TooCool(" & Rng.Address & ",J3))"
End Function
M.
Bookmarks