Color a result cell in a user defined function

A

aaa

Hi !!
I had written a personal average function in VBA:

myAverage(ByVal myRange As Range) As Single

the result is correct, but now I am interesting in coloring (under
certain conditions) the background of the cell where I have written my
formula.

How can I identify the cell where I have written my formula ?
ActiveCell doesn't fit for me because it may not identify the correct
cell (if I move it for example).

Could you help me please,
Nico
 
A

Ardus Petus

Application.Caller the renvoie la référence (Range) de la cellule appelante.

Cordialement,
 
Top