VBA function to get the name of a name....

Hello all,

I am writing a very easy user-defined function "GetName".

This function takes only one argument as input, a user-defined name in a worksheet, then it returns a String - the name of that name.

For example, users have defined a name "List" which refers to B1:B10 on the worksheet. I would like GetName(List) to return "List" as String.

Could anyone tell me which function i should use in VBA to do so? It seems that .Name or .RefersTo cannot do it...

Thanks and regards


Nick's picture


hi Tie

try this:


Hope you're well !




That is exactly what I am looking for! Thank you very much, Nick!

I am now in Paris and working for a French Bank... Everything is almost all right...



Nick's picture

well done

Well done Tie... good for you.